/* Fire Ember Architecture Studio - Custom CSS */

:root {
  --primary-color: #D32F2F;
  --secondary-color: #424242;
  --ember-glow: #FF5722;
  --dark-ember: #B71C1C;
  --light-ember: #EF5350;
  --ash-gray: #757575;
  --charcoal: #212121;
  --smoke-white: #FAFAFA;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--secondary-color);
  overflow-x: hidden;
  line-height: 1.6;
  background-color: #ffffff;
}

/* Typography */
.display-2, .display-3, .display-4, .display-5 {
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  line-height: 1.1 !important;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.95;
}

h4, .h4, h5, .h5, h6, .h6 {
  font-weight: 600;
  color: var(--secondary-color);
}

/* Navbar Styles */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-ember) 100%) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 20px rgba(211, 47, 47, 0.2);
  padding: 1rem 0;
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 30px rgba(211, 47, 47, 0.3);
}

.navbar-brand {
  font-size: 1.5rem !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.navbar-toggler {
  border: 2px solid #ffffff !important;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
}

.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' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 6px;
}

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

.nav-link.active {
  color: #ffffff !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  font-weight: 600 !important;
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #ffffff;
  transition: width 0.3s ease;
}

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

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-ember) 50%, var(--charcoal) 100%);
  color: #ffffff !important;
  position: relative;
  padding: 120px 0 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.geometric-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(45deg, transparent 30%, rgba(255, 87, 34, 0.1) 30%, rgba(255, 87, 34, 0.1) 70%, transparent 70%),
    linear-gradient(-45deg, transparent 30%, rgba(183, 28, 28, 0.1) 30%, rgba(183, 28, 28, 0.1) 70%, transparent 70%);
  background-size: 100px 100px;
  animation: geometricMove 20s linear infinite;
  pointer-events: none;
}

@keyframes geometricMove {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 100px 100px, -100px 100px; }
}

.hero-section h1,
.hero-section .display-2,
.hero-section .display-3 {
  color: #ffffff !important;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  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;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  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.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

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

.btn-primary,
.btn.btn-lg:not(.btn-outline-light):not(.btn-outline-secondary):not(.btn-light) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-ember) 100%) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

.btn-primary:hover,
.btn.btn-lg:not(.btn-outline-light):not(.btn-outline-secondary):not(.btn-light):hover {
  background: linear-gradient(135deg, var(--dark-ember) 0%, var(--primary-color) 100%) !important;
  border-color: var(--dark-ember) !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(211, 47, 47, 0.4);
}

.btn-outline-light {
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
  background: transparent !important;
}

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

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

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

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

.btn-light:hover {
  background: transparent !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  transform: translateY(-3px);
}

/* Cards */
.card {
  border-radius: 12px;
  transition: all 0.4s ease;
  border: none;
  background: #ffffff;
  overflow: hidden;
}

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

.card-body {
  background: #ffffff;
  color: var(--secondary-color) !important;
}

.card-title,
.card h4,
.card .h4,
.card h5,
.card .h5 {
  color: var(--primary-color) !important;
  font-weight: 700;
}

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

.card-img-top {
  transition: transform 0.4s ease;
  height: 250px;
  object-fit: cover;
}

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

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

/* Shadows */
.shadow-sm {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
}

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

/* Images */
.img-fluid {
  transition: transform 0.4s ease;
}

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

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

/* Sections */
section {
  padding: 80px 0;
  position: relative;
}

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

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

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

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

/* Background Variants */
.bg-light {
  background-color: var(--smoke-white) !important;
}

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

/* Text Colors */
.text-muted {
  color: var(--ash-gray) !important;
}

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

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

.text-light {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Masonry Grid */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-gap: 2rem;
  grid-auto-rows: 20px;
}

.masonry-item {
  grid-row-end: span 20;
  transition: all 0.4s ease;
}

.masonry-item:hover {
  transform: translateY(-8px);
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
  color: var(--secondary-color) !important;
}

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

.form-label {
  font-weight: 600;
  color: var(--secondary-color) !important;
  margin-bottom: 0.5rem;
}

.form-check-input {
  border: 2px solid #e0e0e0;
  width: 1.25rem;
  height: 1.25rem;
}

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

.form-check-label {
  color: var(--secondary-color) !important;
  margin-left: 0.5rem;
}

/* Icons */
.bi {
  display: inline-block;
  vertical-align: middle;
}

.bi-geo-alt-fill,
.bi-geo-alt,
.bi-telephone-fill,
.bi-telephone,
.bi-envelope-fill,
.bi-envelope,
.bi-send,
.bi-calendar-check,
.bi-file-earmark-text,
.bi-arrow-right,
.bi-check-circle-fill {
  color: var(--primary-color);
}

/* Alert */
.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem 1.5rem;
}

/* Sticky Elements */
.sticky-top {
  position: sticky !important;
  top: 20px;
  z-index: 1020;
}

.position-sticky {
  position: sticky !important;
  top: 100px;
}

/* Aspect Ratio */
.ratio {
  position: relative;
  width: 100%;
}

.ratio::before {
  display: block;
  padding-top: var(--bs-aspect-ratio);
  content: "";
}

.ratio-21x9 {
  --bs-aspect-ratio: 42.857143%;
}

.ratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Links */
a {
  transition: all 0.3s ease;
  color: var(--primary-color);
}

a:hover {
  color: var(--dark-ember);
}

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

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

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

.list-unstyled li {
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.list-unstyled li:hover {
  padding-left: 10px;
  color: var(--primary-color);
}

/* Utilities */
.overflow-hidden {
  overflow: hidden !important;
}

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

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

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

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

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

.opacity-25 {
  opacity: 0.25 !important;
}

/* Spacing */
.gap-3 {
  gap: 1rem !important;
}

.g-3 {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

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

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

/* Animations */
@keyframes ember-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(211, 47, 47, 0.6);
  }
}

.ember-effect {
  animation: ember-glow 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Footer Styles */
footer {
  background: linear-gradient(135deg, var(--charcoal) 0%, var(--secondary-color) 100%);
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 60px 0 20px;
}

footer h5,
footer .h5 {
  color: #ffffff !important;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none;
}

footer a:hover {
  color: var(--light-ember) !important;
  text-decoration: none;
  padding-left: 5px;
}

footer .small,
footer small {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(0, 0, 0, 0.95);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
  }
  
  .hero-section {
    padding: 100px 0 60px;
    min-height: auto;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .display-5 {
    font-size: 1.5rem !important;
  }
  
  section {
    padding: 60px 0;
  }
  
  .btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
  }
  
  .masonry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 80px 0 40px;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  section {
    padding: 40px 0;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .card-img-top {
    height: 200px;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding: 60px 0 30px;
  }
  
  .display-2 {
    font-size: 1.75rem !important;
  }
  
  .navbar-brand {
    font-size: 1.25rem !important;
  }
  
  .btn {
    padding: 0.5rem 1.5rem !important;
    font-size: 0.875rem !important;
  }
  
  .gap-3 {
    gap: 0.5rem !important;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  footer {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  .hero-section {
    min-height: auto;
    page-break-after: always;
  }
}