/* Charcoal Ember Architecture Studio Theme CSS */

/* ==================== ROOT VARIABLES ==================== */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E67E22;
  --charcoal: #1a1a1a;
  --ember-glow: #FF6B35;
  --light-gray: #ECF0F1;
  --dark-gray: #34495E;
  --white: #FFFFFF;
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== GLOBAL STYLES ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--primary-color) !important;
  background-color: var(--light-gray) !important;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ==================== TYPOGRAPHY ==================== */
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--primary-color) !important;
}

.h1, .h2, .h3, .h4, .h5, h1, h2, h3, h4, h5 {
  color: var(--primary-color) !important;
  font-weight: 600;
}

.fs-3,
.fs-4,
.fs-5 {
  color: var(--dark-gray) !important;
}

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

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

.text-muted {
  color: #7F8C8D !important;
}

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

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

/* ==================== NAVIGATION ==================== */
.navbar {
  background: linear-gradient(180deg, rgba(28, 40, 51, 0.95) 0%, rgba(44, 62, 80, 0.85) 100%) !important;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
  z-index: 1050;
  border-bottom: 2px solid var(--secondary-color);
}

.navbar.scrolled {
  background: var(--primary-color) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
  color: var(--white) !important;
  font-weight: 700 !important;
  font-size: 1.75rem !important;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.navbar-nav .nav-link {
  color: var(--light-gray) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
  transition: var(--transition-smooth);
  position: relative;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

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

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--secondary-color) !important;
}

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

.navbar-toggler {
  border: 2px solid var(--white) !important;
  padding: 0.5rem !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-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--charcoal) 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(230, 126, 34, 0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
  opacity: 0.3;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

.hero-section .display-2 {
  color: var(--white) !important;
  font-size: clamp(2.5rem, 6vw, 4.5rem) !important;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero-section .fs-4 {
  color: var(--light-gray) !important;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1.2s ease-out;
}

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

/* ==================== BUTTONS ==================== */
.btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  transition: var(--transition-smooth) !important;
  border: none !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--ember-glow) 100%) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ember-glow) 0%, var(--secondary-color) 100%) !important;
  color: var(--white) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(230, 126, 34, 0.6);
}

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

.btn-outline-primary:hover {
  background: var(--secondary-color) !important;
  color: var(--white) !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(230, 126, 34, 0.4);
}

.btn-light {
  background: var(--white) !important;
  color: var(--primary-color) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
  background: var(--light-gray) !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

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

.btn-outline-secondary:hover {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  border-color: var(--primary-color) !important;
  transform: translateY(-3px);
}

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

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(44, 62, 80, 0.2) !important;
}

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

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

.card-text {
  color: var(--dark-gray) !important;
  line-height: 1.7;
}

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.shadow {
  box-shadow: 0 8px 30px rgba(44, 62, 80, 0.15) !important;
}

.shadow-sm {
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1) !important;
}

.shadow-lg {
  box-shadow: 0 15px 50px rgba(44, 62, 80, 0.25) !important;
}

/* ==================== PROJECT CARDS ==================== */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  height: 350px;
  background: var(--charcoal);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(44, 62, 80, 0.95) 100%);
  opacity: 0;
  transition: var(--transition-smooth);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-card:hover img {
  transform: scale(1.15);
}

.project-details {
  color: var(--white) !important;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.project-card:hover .project-details {
  transform: translateY(0);
}

.project-details h3,
.project-details .h3 {
  color: var(--white) !important;
  margin-bottom: 0.5rem;
}

.project-details p {
  color: var(--light-gray) !important;
  margin-bottom: 0;
}

/* ==================== BADGES ==================== */
.badge {
  background: var(--secondary-color) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 20px !important;
  font-size: 0.875rem !important;
}

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

.form-control,
.form-select {
  border: 2px solid var(--light-gray) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  color: var(--primary-color) !important;
  background: var(--white) !important;
  transition: var(--transition-smooth);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(230, 126, 34, 0.25) !important;
  background: var(--white) !important;
  color: var(--primary-color) !important;
}

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

.form-check-input {
  border: 2px solid var(--primary-color) !important;
  cursor: pointer;
}

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

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

/* ==================== BOOTSTRAP ICONS ==================== */
.bi {
  color: var(--secondary-color) !important;
  vertical-align: middle;
}

.bi-geo-alt-fill,
.bi-telephone-fill,
.bi-envelope-fill,
.bi-linkedin,
.bi-check-circle-fill,
.bi-arrow-right-short,
.bi-patch-check-fill,
.bi-house-door,
.bi-building,
.bi-leaf,
.bi-rulers,
.bi-clipboard-check,
.bi-bank,
.bi-chevron-down,
.bi-geo-alt,
.bi-telephone,
.bi-envelope {
  transition: var(--transition-smooth);
}

.card:hover .bi,
.btn:hover .bi {
  transform: scale(1.2);
}

.rounded-circle {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--ember-glow) 100%) !important;
  color: var(--white) !important;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-inline-flex .bi {
  color: var(--white) !important;
}

/* ==================== BACKGROUNDS ==================== */
.bg-white {
  background-color: var(--white) !important;
}

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

section {
  background: var(--white) !important;
}

section:nth-child(even) {
  background: var(--light-gray) !important;
}

/* ==================== IMAGES ==================== */
.img-fluid {
  border-radius: 12px;
  transition: var(--transition-smooth);
  box-shadow: 0 8px 30px rgba(44, 62, 80, 0.15);
}

.img-fluid:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(44, 62, 80, 0.25);
}

.object-fit-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

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

.position-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 2rem;
}

.sticky-lg-top {
  position: -webkit-sticky;
  position: sticky;
  top: 2rem;
}

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

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

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

.border-top {
  border-top: 2px solid rgba(44, 62, 80, 0.1) !important;
}

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

.border-light {
  border-color: var(--light-gray) !important;
}

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

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

.list-unstyled li {
  margin-bottom: 0.75rem;
  color: var(--dark-gray) !important;
}

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

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

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

/* ==================== SCROLL ANIMATIONS ==================== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(44, 62, 80, 0.98);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  }

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

  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .hero-section .display-2 {
    font-size: 2.5rem !important;
  }

  .hero-section .fs-4 {
    font-size: 1.1rem !important;
  }

  .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
  }

  .display-3 {
    font-size: 2.5rem !important;
  }

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

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

  .project-card {
    height: 280px;
  }

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

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

@media (max-width: 767px) {
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

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

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

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

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

  .btn-lg {
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .project-card {
    height: 250px;
  }

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

  .card-img-top {
    height: 200px;
  }
}

@media (max-width: 575px) {
  .hero-section .display-2 {
    font-size: 1.75rem !important;
  }

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

  .navbar-brand {
    font-size: 1.5rem !important;
  }

  .project-card {
    height: 220px;
  }

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

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

/* ==================== CUSTOM ANIMATIONS ==================== */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

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

.pulse-animation {
  animation: pulse 2s ease-in-out infinite;
}

/* ==================== LOADING STATES ==================== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ==================== PRINT STYLES ==================== */
@media print {
  .navbar,
  .btn,
  .form-control {
    display: none;
  }

  body {
    background: white !important;
  }
}

/* ==================== ACCESSIBILITY ==================== */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn,
  .card,
  .form-control {
    border: 2px solid currentColor !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}