/* Racing Red & Charcoal Architectural Studio CSS */

:root {
  --primary-color: #D32F2F;
  --secondary-color: #424242;
  --dark-bg: #1a1a1a;
  --light-gray: #f5f5f5;
  --white: #ffffff;
  --transition: all 0.3s ease;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--secondary-color);
}

.display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 800 !important;
  color: var(--secondary-color) !important;
}

/* Navbar Styles */
.navbar {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-bg) 100%) !important;
  padding: 1rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.navbar-dark .navbar-brand {
  color: var(--white) !important;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 1px;
  transition: var(--transition);
}

.navbar-dark .navbar-brand:hover {
  color: var(--primary-color) !important;
  transform: translateX(5px);
}

.navbar-dark .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  margin: 0 0.2rem;
  transition: var(--transition);
  position: relative;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
  color: var(--primary-color) !important;
  background: rgba(211, 47, 47, 0.1);
  border-radius: 5px;
}

.navbar-dark .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 3px;
  background: var(--primary-color);
  border-radius: 5px;
}

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

.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(211, 47, 47, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Hero Section */
.position-relative.overflow-hidden {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-bg) 100%);
  color: var(--white);
  position: relative;
}

.position-relative.overflow-hidden::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h100v100H0z" fill="none"/%3E%3Cpath d="M0 0l100 100M100 0L0 100" stroke="%23D32F2F" stroke-width="0.5" opacity="0.1"/%3E%3C/svg%3E');
  opacity: 0.3;
  animation: bgMove 20s linear infinite;
}

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

.position-relative .display-2 {
  color: var(--white) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease;
}

.position-relative .fs-4 {
  color: rgba(255, 255, 255, 0.95) !important;
  animation: fadeInUp 1.2s ease;
}

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

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  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-lg {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

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

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

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

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

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

/* Cards */
.card {
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
  border: none;
  background: var(--white);
}

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

.card-body {
  background: var(--white);
  color: var(--secondary-color);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #b71c1c 100%) !important;
  color: var(--white) !important;
  border: none;
  font-weight: 700;
}

.card-title {
  color: var(--secondary-color) !important;
  font-weight: 700;
}

.card-text {
  color: #666 !important;
}

.card .bi {
  color: var(--primary-color);
  transition: var(--transition);
}

.card:hover .bi {
  transform: scale(1.2) rotate(10deg);
}

/* Badge */
.badge {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  font-weight: 600;
  border-radius: 20px;
}

/* Background Utilities */
.bg-danger {
  background: var(--primary-color) !important;
  color: var(--white) !important;
}

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

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

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

.bg-opacity-10 {
  background: rgba(211, 47, 47, 0.1) !important;
}

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

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

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

.text-success {
  color: #28a745 !important;
}

.text-warning {
  color: #ffc107 !important;
}

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

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

/* Section Backgrounds */
.py-5 {
  background: var(--white);
}

.py-5:nth-child(even) {
  background: var(--light-gray);
}

/* Images */
.img-fluid {
  border-radius: 12px;
  transition: var(--transition);
}

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

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

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

.shadow {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
}

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

.bi-gear-fill,
.bi-cpu-fill,
.bi-gear-wide-connected,
.bi-speedometer2,
.bi-disc-fill,
.bi-lightning-charge-fill,
.bi-clipboard-check-fill,
.bi-award-fill,
.bi-laptop-fill,
.bi-shield-check-fill,
.bi-patch-check-fill,
.bi-star-fill,
.bi-wrench-adjustable-circle-fill,
.bi-calendar-check-fill,
.bi-pc-display-horizontal,
.bi-activity,
.bi-lightning-charge,
.bi-cpu,
.bi-hdd-network,
.bi-laptop,
.bi-graph-up,
.bi-soundwave,
.bi-bezier2 {
  color: var(--primary-color);
}

/* Accordion */
.accordion-item {
  border: 1px solid rgba(66, 66, 66, 0.2);
  margin-bottom: 1rem;
  border-radius: 8px !important;
  overflow: hidden;
}

.accordion-button {
  background: var(--white) !important;
  color: var(--secondary-color) !important;
  font-weight: 600;
  border: none;
}

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

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

.accordion-body {
  background: var(--light-gray);
  color: var(--secondary-color) !important;
}

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

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

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

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

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

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

/* Alert */
.alert {
  border-radius: 8px;
  border: none;
}

.alert-danger {
  background: rgba(211, 47, 47, 0.1) !important;
  color: var(--primary-color) !important;
  border-left: 4px solid var(--primary-color);
}

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

.alert-heading {
  color: var(--primary-color) !important;
  font-weight: 700;
}

/* Tabs */
.nav-pills .nav-link {
  color: var(--secondary-color) !important;
  background: var(--white);
  border-radius: 0;
  border-left: 3px solid transparent;
  transition: var(--transition);
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}

.nav-pills .nav-link:hover {
  background: var(--light-gray);
  border-left-color: var(--primary-color);
}

.nav-pills .nav-link.active {
  background: var(--primary-color) !important;
  color: var(--white) !important;
  border-left-color: #b71c1c;
}

.tab-content {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
}

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

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--primary-color);
}

.timeline::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 15px;
  height: 15px;
  background: var(--primary-color);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--white);
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-bg) 100%);
  color: rgba(255, 255, 255, 0.9) !important;
}

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

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

footer .bi-facebook,
footer .bi-instagram,
footer .bi-youtube,
footer .bi-linkedin,
footer .bi-twitter {
  font-size: 1.5rem;
  transition: var(--transition);
}

footer .bi-facebook:hover,
footer .bi-instagram:hover,
footer .bi-youtube:hover,
footer .bi-linkedin:hover,
footer .bi-twitter:hover {
  color: var(--primary-color) !important;
  transform: translateY(-3px);
}

/* List Styles */
.list-unstyled li {
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Rounded Circle */
.rounded-circle {
  border: 3px solid var(--primary-color);
  padding: 1rem;
  background: var(--white);
}

/* Border Utilities */
.border-3 {
  border-width: 3px !important;
}

.border-start {
  border-left-color: var(--primary-color) !important;
}

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

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

/* Sticky Top */
.sticky-top {
  top: 80px;
}

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

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

/* Display Utilities */
.d-inline-block {
  display: inline-block !important;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.card:hover {
  animation: pulse 0.5s ease;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(26, 26, 26, 0.95);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .px-lg-5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .ps-lg-5 {
    padding-left: 1rem !important;
  }
}

@media (max-width: 767.98px) {
  .btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 1rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .py-5 {
    padding: 3rem 0 !important;
  }
  
  .position-relative.overflow-hidden {
    min-height: 100vh;
    padding-top: 80px;
  }
}

@media (max-width: 575.98px) {
  .display-2 {
    font-size: 2rem !important;
  }
  
  .fs-4 {
    font-size: 1rem !important;
  }
  
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* Scroll Behavior */
html {
  scroll-behavior: smooth;
}

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

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

/* Loading Animation */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.bi-gear-fill,
.bi-gear-wide-connected {
  animation: spin 3s linear infinite;
}

/* Hover Effects for Links */
a.text-decoration-none:hover {
  color: var(--primary-color) !important;
}

/* Text Utilities Override */
.lead {
  color: var(--secondary-color);
}

/* Container Fluid */
.container-fluid {
  max-width: 100%;
}

/* Position Utilities */
.position-absolute {
  z-index: 1;
}

.position-relative {
  z-index: 2;
}

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

/* Small Text */
.small {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* G-0 Utility */
.g-0 {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}

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

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

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

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

/* Additional Contrast Fixes */
.text-decoration-none {
  color: inherit !important;
}

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

/* Ensure readability on all backgrounds */
.bg-danger .text-white,
.bg-secondary .text-white {
  color: var(--white) !important;
}

.bg-light .text-muted {
  color: #666 !important;
}

/* Button group spacing */
.flex-wrap.gap-3 {
  display: flex;
  flex-wrap: wrap;
}

/* Ensure proper contrast for all interactive elements */
.btn, .nav-link, .accordion-button, .form-control, .card {
  color: var(--secondary-color) !important;
}

.btn-lg, .btn-light:hover {
  color: var(--white) !important;
}

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

.navbar-dark .navbar-brand,
.navbar-dark .nav-link,
footer,
footer a {
  color: var(--white) !important;
}