/* Racing Red & Carbon - Architectural Studio Theme */

:root {
  --primary-color: #D32F2F;
  --secondary-color: #424242;
  --dark-bg: #1a1a1a;
  --light-text: #ffffff;
  --carbon-pattern: linear-gradient(27deg, #151515 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, #151515 5px, transparent 5px) 10px 0px,
    linear-gradient(27deg, #222 5px, transparent 5px) 0px 10px,
    linear-gradient(207deg, #222 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, #1b1b1b 10px, transparent 10px),
    linear-gradient(#1d1d1d 25%, #1a1a1a 25%, #1a1a1a 50%, transparent 50%, transparent 75%, #242424 75%, #242424);
  --carbon-size: 20px 20px;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0a0a0a !important;
  color: #ffffff !important;
  overflow-x: hidden;
  line-height: 1.6;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #b71c1c;
}

/* Navigation */
.navbar {
  background: rgba(26, 26, 26, 0.98) !important;
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(211, 47, 47, 0.3);
  transition: all 0.3s ease;
  border-bottom: 2px solid var(--primary-color);
}

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

.navbar-brand {
  font-size: 1.8rem !important;
  color: var(--light-text) !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 800 !important;
  position: relative;
  padding-left: 15px;
}

.navbar-brand::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 100%;
  background: var(--primary-color);
  animation: pulse 2s infinite;
}

.navbar-brand:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
  transition: all 0.3s ease;
}

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

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.5) !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: 600 !important;
  text-transform: uppercase;
  font-size: 0.9rem;
  padding: 0.5rem 1.2rem !important;
  margin: 0 0.2rem;
  position: relative;
  transition: all 0.3s ease;
  letter-spacing: 1px;
}

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

.nav-link:hover {
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

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

.nav-link.active {
  color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: var(--carbon-pattern), linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  background-size: var(--carbon-size);
  position: relative;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
}

.engine-overlay {
  background: radial-gradient(circle at 20% 50%, rgba(211, 47, 47, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(211, 47, 47, 0.1) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
  animation: enginePulse 4s ease-in-out infinite;
}

@keyframes enginePulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

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

.display-1 {
  font-weight: 900 !important;
  color: var(--light-text) !important;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.1 !important;
  text-shadow: 0 4px 20px rgba(211, 47, 47, 0.5);
}

.display-4 {
  color: var(--primary-color) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.lead {
  font-size: 1.3rem !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 400 !important;
  line-height: 1.8 !important;
}

/* Buttons */
.btn {
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-radius: 0 !important;
  transition: all 0.3s ease !important;
  position: relative;
  overflow: hidden;
  border: none !important;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-lg {
  background: var(--primary-color) !important;
  color: var(--light-text) !important;
  border: 2px solid var(--primary-color) !important;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

.btn-lg:hover {
  background: #b71c1c !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 25px rgba(211, 47, 47, 0.6) !important;
  color: #ffffff !important;
}

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

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

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

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

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

.bi-chevron-down {
  animation: bounce 2s infinite;
  font-size: 2rem;
  color: var(--primary-color) !important;
}

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

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

/* Images */
.img-fluid {
  border: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.img-fluid:hover {
  transform: scale(1.05) rotate(1deg);
  box-shadow: 0 10px 40px rgba(211, 47, 47, 0.6) !important;
}

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

.shadow-lg {
  box-shadow: 0 8px 30px rgba(211, 47, 47, 0.4) !important;
}

.shadow-sm {
  box-shadow: 0 2px 10px rgba(211, 47, 47, 0.3) !important;
}

.shadow {
  box-shadow: 0 4px 20px rgba(211, 47, 47, 0.3) !important;
}

/* Sections */
.py-5 {
  padding: 5rem 0 !important;
  background: var(--carbon-pattern), var(--dark-bg);
  background-size: var(--carbon-size);
}

.py-4 {
  padding: 4rem 0 !important;
}

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

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

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

/* Headings */
.display-5 {
  font-weight: 800 !important;
  color: var(--light-text) !important;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
  display: inline-block;
}

.display-5::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary-color);
}

.h4, .h5 {
  color: var(--light-text) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

/* Cards */
.card {
  background: rgba(66, 66, 66, 0.5) !important;
  border: 2px solid var(--secondary-color) !important;
  border-radius: 0 !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color) !important;
  box-shadow: 0 10px 40px rgba(211, 47, 47, 0.4) !important;
}

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

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

/* Service Cards */
.service-card {
  background: var(--carbon-pattern), rgba(26, 26, 26, 0.95);
  background-size: var(--carbon-size);
  border: 2px solid var(--secondary-color);
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(211, 47, 47, 0.1));
  transition: width 0.4s ease;
}

.service-card:hover::after {
  width: 100%;
  left: 0;
  right: auto;
}

.service-card:hover {
  border-color: var(--primary-color);
  transform: translateX(10px);
  box-shadow: -5px 5px 30px rgba(211, 47, 47, 0.3);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: white;
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: rotate(360deg) scale(1.1);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--primary-color);
}

.timeline-item {
  position: relative;
  padding-bottom: 3rem;
}

.timeline-marker {
  position: absolute;
  left: -3.5rem;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--primary-color);
  border: 4px solid var(--dark-bg);
  z-index: 2;
}

.timeline-year {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem;
}

.timeline-content {
  background: rgba(66, 66, 66, 0.3);
  padding: 1.5rem;
  border-left: 3px solid var(--primary-color);
}

/* Masonry Grid */
.masonry-grid {
  column-count: 3;
  column-gap: 1.5rem;
}

.masonry-grid > div {
  break-inside: avoid;
  margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 576px) {
  .masonry-grid {
    column-count: 1;
  }
}

/* Badge */
.badge {
  background: var(--primary-color) !important;
  color: white !important;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Accordion */
.accordion-item {
  background: rgba(66, 66, 66, 0.3) !important;
  border: 1px solid var(--secondary-color) !important;
  border-radius: 0 !important;
  margin-bottom: 1rem;
}

.accordion-button {
  background: rgba(26, 26, 26, 0.8) !important;
  color: var(--light-text) !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none !important;
  padding: 1.5rem !important;
}

.accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25) !important;
}

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

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

.accordion-body {
  background: rgba(26, 26, 26, 0.5) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 2rem !important;
  border-top: 2px solid var(--primary-color);
}

.accordion-collapse.show {
  border-top: none;
}

/* Carousel */
.carousel {
  background: rgba(26, 26, 26, 0.8);
  padding: 3rem 0;
}

.carousel-indicators {
  bottom: -3rem;
}

.carousel-indicators button {
  background-color: var(--primary-color) !important;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 5px;
}

.carousel-item {
  padding: 2rem;
  min-height: 300px;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: var(--primary-color);
  border-radius: 50%;
  padding: 1.5rem;
}

/* Table */
.table-responsive {
  background: rgba(26, 26, 26, 0.8);
  padding: 2rem;
  border: 2px solid var(--secondary-color);
}

.table {
  color: var(--light-text) !important;
  margin-bottom: 0;
}

.table thead {
  background: var(--primary-color) !important;
  color: white !important;
}

.table thead th {
  border: none !important;
  padding: 1rem !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}

.table tbody tr {
  border-bottom: 1px solid var(--secondary-color);
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(211, 47, 47, 0.1) !important;
  transform: scale(1.01);
}

.table td {
  padding: 1rem !important;
  border: none !important;
}

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

.bg-warning {
  background-color: #FFA726 !important;
}

/* Forms */
.form-label {
  color: var(--light-text) !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  margin-bottom: 0.8rem !important;
}

.form-control,
.form-select,
.form-control-lg {
  background: rgba(66, 66, 66, 0.5) !important;
  border: 2px solid var(--secondary-color) !important;
  border-radius: 0 !important;
  color: var(--light-text) !important;
  padding: 0.875rem 1rem !important;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus,
.form-control-lg:focus {
  background: rgba(66, 66, 66, 0.8) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25) !important;
  color: var(--light-text) !important;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

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

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

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

.text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

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

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

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

/* Background utilities */
.bg-white {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Opacity utilities */
.opacity-75 {
  opacity: 0.75 !important;
}

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

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

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

.list-unstyled li {
  padding: 0.5rem 0;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s ease;
}

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

/* Links */
a {
  color: var(--primary-color) !important;
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: #b71c1c !important;
  text-decoration: underline;
}

/* Ratio */
.ratio {
  border: 3px solid var(--primary-color);
}

.ratio-16x9 {
  background: rgba(0, 0, 0, 0.8);
}

/* Position utilities */
.position-sticky {
  position: sticky !important;
  top: 80px;
  z-index: 100;
}

/* Footer */
footer {
  background: var(--carbon-pattern), #0a0a0a;
  background-size: var(--carbon-size);
  border-top: 3px solid var(--primary-color);
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

footer h4 {
  color: var(--primary-color) !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 1.5rem !important;
}

footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: all 0.3s ease;
  display: inline-block;
}

footer a:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
  text-decoration: none !important;
}

footer .bi {
  margin-right: 0.5rem;
  color: var(--primary-color);
}

/* Border utilities */
.border-bottom {
  border-bottom: 1px solid rgba(66, 66, 66, 0.5) !important;
}

/* Founder Story */
.founder-story {
  background: rgba(26, 26, 26, 0.6);
  padding: 3rem;
  border-left: 5px solid var(--primary-color);
}

/* Min height */
.min-vh-75 {
  min-height: 75vh;
}

/* Flex utilities */
.flex-shrink-0 {
  flex-shrink: 0 !important;
}

/* Animations */
@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 fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(26, 26, 26, 0.98);
    padding: 1rem;
    margin-top: 1rem;
    border: 2px solid var(--primary-color);
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(66, 66, 66, 0.5);
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .display-1 {
    font-size: 3rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .lead {
    font-size: 1.1rem !important;
  }
  
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .btn-lg {
    padding: 0.75rem 2rem !important;
  }
}

@media (max-width: 767px) {
  .display-1 {
    font-size: 2.5rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .display-5 {
    font-size: 2rem !important;
  }
  
  .py-5 {
    padding: 3rem 0 !important;
  }
  
  .btn-lg {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .timeline {
    padding-left: 2rem;
  }
  
  .timeline-marker {
    left: -2.5rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.4rem !important;
  }
  
  .display-1 {
    font-size: 2rem !important;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .gap-3 {
    gap: 0.5rem !important;
  }
  
  .gap-4 {
    gap: 0.75rem !important;
  }
}

/* Print styles */
@media print {
  .navbar,
  .btn,
  footer {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}