/* Midnight Crimson Architecture Studio CSS */

:root {
  --primary-color: #1A1A2E;
  --secondary-color: #E94560;
  --accent-color: #0F3460;
  --light-bg: #F8F9FA;
  --dark-text: #1A1A2E;
  --light-text: #ffffff;
  --transition-speed: 0.3s;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 800 !important;
  letter-spacing: -1px !important;
}

/* Navbar Styles */
.navbar {
  background-color: var(--primary-color) !important;
  padding: 1.2rem 0;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.1);
  transition: all var(--transition-speed) ease;
}

.navbar-dark .navbar-brand {
  color: var(--light-text) !important;
  font-size: 1.6rem;
  font-weight: 700 !important;
  letter-spacing: 1px;
  transition: all var(--transition-speed) ease;
}

.navbar-dark .navbar-brand:hover {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

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

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

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

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

.navbar-toggler {
  border-color: var(--secondary-color) !important;
  padding: 0.5rem 0.75rem;
}

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

.sticky-top {
  top: 0;
  z-index: 1020;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  min-height: 90vh;
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.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='%23E94560' 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;
}

.hero-section .text-white {
  color: var(--light-text) !important;
  position: relative;
  z-index: 2;
}

.hero-section .display-2 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 2rem !important;
  animation: fadeInUp 1s ease;
  border-left: 6px solid var(--secondary-color);
  padding-left: 1.5rem !important;
}

.hero-section .h3 {
  color: var(--secondary-color) !important;
  font-weight: 600;
  margin-bottom: 1rem !important;
  animation: fadeInUp 1.2s ease;
}

.hero-section .lead {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9) !important;
  animation: fadeInUp 1.4s ease;
  margin-bottom: 2.5rem !important;
}

/* Buttons */
.btn {
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-speed) ease;
  border: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background-color: 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;
}

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

.btn-primary:hover {
  background-color: #d63850 !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4) !important;
}

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

.btn-outline-light:hover {
  background-color: var(--light-text) !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3) !important;
}

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

.btn-light:hover {
  background-color: var(--secondary-color) !important;
  color: var(--light-text) !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(233, 69, 96, 0.4) !important;
}

/* Cards */
.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
}

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

.card-header {
  background-color: var(--primary-color) !important;
  color: var(--light-text) !important;
  font-weight: 600;
  border: none;
  padding: 1.2rem 1.5rem;
}

.card-body {
  padding: 1.5rem;
}

/* Team Card */
.team-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  height: 400px;
  cursor: pointer;
}

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

.team-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--primary-color) 0%, transparent 100%);
  padding: 2rem;
  color: var(--light-text) !important;
  transform: translateY(70%);
  transition: transform 0.5s ease;
}

.team-card:hover .team-overlay {
  transform: translateY(0);
}

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

/* Sections */
section {
  padding: 5rem 0;
}

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

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

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

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

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

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

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

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

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

/* Icons */
.bi {
  font-size: 2.5rem;
  color: var(--secondary-color);
  transition: all var(--transition-speed) ease;
}

.bi:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 0.8rem 1.2rem;
  transition: all var(--transition-speed) ease;
  background-color: #ffffff;
  color: var(--dark-text) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(233, 69, 96, 0.15) !important;
  background-color: #ffffff !important;
  color: var(--dark-text) !important;
}

.form-control-lg,
.form-select-lg {
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
}

.form-floating > label {
  color: rgba(26, 26, 46, 0.6) !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--secondary-color) !important;
}

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

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

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

.form-check-input:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 0.25rem rgba(233, 69, 96, 0.15) !important;
}

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

/* Horizontal Scroll Container */
.horizontal-scroll-container {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  padding: 2rem 0;
  gap: 2rem !important;
}

.horizontal-scroll-container::-webkit-scrollbar {
  height: 8px;
}

.horizontal-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 10px;
}

.horizontal-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #d63850;
}

/* Flip Card */
.flip-card {
  background-color: transparent;
  width: 300px;
  height: 400px;
  perspective: 1000px;
  flex-shrink: 0;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.flip-card-front {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--light-text) !important;
}

.flip-card-back {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #ff6b81 100%);
  color: var(--light-text) !important;
  transform: rotateY(180deg);
}

/* Carousel */
.carousel {
  background-color: var(--light-bg);
  padding: 3rem 0;
  border-radius: 15px;
}

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

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

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

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

/* Accordion */
.accordion-item {
  border: 2px solid #e0e0e0 !important;
  margin-bottom: 1rem;
  border-radius: 10px !important;
  overflow: hidden;
  background-color: #ffffff;
}

.accordion-header {
  margin-bottom: 0;
}

.accordion-button {
  background-color: var(--light-bg) !important;
  color: var(--dark-text) !important;
  font-weight: 600;
  padding: 1.2rem 1.5rem;
  border: none !important;
}

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

.accordion-button:focus {
  box-shadow: none !important;
  border-color: var(--secondary-color) !important;
}

.accordion-button::after {
  filter: brightness(0) saturate(100%) invert(27%) sepia(85%) saturate(2474%) hue-rotate(330deg) brightness(95%) contrast(87%);
}

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

.accordion-body {
  padding: 1.5rem;
  background-color: #ffffff;
  color: var(--dark-text) !important;
}

.accordion-collapse {
  border-top: 2px solid var(--secondary-color);
}

/* Nav Pills */
.nav-pills .nav-link {
  color: var(--dark-text) !important;
  background-color: transparent;
  border: 2px solid #e0e0e0;
  margin: 0.3rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all var(--transition-speed) ease;
}

.nav-pills .nav-link:hover {
  border-color: var(--secondary-color);
  color: var(--secondary-color) !important;
}

.nav-pills .nav-link.active {
  background-color: var(--secondary-color) !important;
  color: var(--light-text) !important;
  border-color: var(--secondary-color);
}

/* Tab Content */
.tab-content {
  padding: 2rem;
  background-color: #ffffff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  margin-top: 1rem;
}

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

/* Diagnostic Hotspot */
.diagnostic-hotspot {
  position: relative;
  display: inline-block;
  cursor: pointer;
  margin: 1rem;
}

.diagnostic-hotspot .bi {
  animation: pulse 2s infinite;
}

.diagnostic-details {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Alerts */
.alert {
  border: none;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  border-left: 4px solid;
}

.alert-info {
  background-color: rgba(233, 69, 96, 0.1) !important;
  color: var(--dark-text) !important;
  border-left-color: var(--secondary-color) !important;
}

.alert .bi {
  font-size: 1.5rem;
  margin-right: 0.8rem;
}

/* Modal */
.modal-content {
  border: none;
  border-radius: 15px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
  background-color: #ffffff;
}

.modal-header {
  background-color: var(--primary-color) !important;
  color: var(--light-text) !important;
  border-bottom: none;
  border-radius: 15px 15px 0 0;
  padding: 1.5rem 2rem;
}

.modal-title {
  font-weight: 700;
  color: var(--light-text) !important;
}

.modal-body {
  padding: 2rem;
  color: var(--dark-text) !important;
  background-color: #ffffff;
}

.btn-close,
.btn-close-white {
  filter: brightness(0) invert(1);
  opacity: 1 !important;
}

.btn-close:hover,
.btn-close-white:hover {
  filter: brightness(0) invert(1);
  opacity: 0.8 !important;
}

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

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

.list-unstyled a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  transition: all var(--transition-speed) ease;
  display: inline-block;
}

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

/* Footer */
footer {
  background-color: var(--primary-color) !important;
  color: var(--light-text) !important;
  padding: 3rem 0 1rem;
}

footer h5,
footer .h5 {
  color: var(--light-text) !important;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.8rem;
}

footer h5::after,
footer .h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--secondary-color);
}

footer p,
footer a {
  color: rgba(255, 255, 255, 0.8) !important;
}

footer .bi {
  font-size: 1.5rem;
  margin: 0 0.5rem;
  color: rgba(255, 255, 255, 0.8);
}

footer .bi:hover {
  color: var(--secondary-color) !important;
}

/* Shadows */
.shadow {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
}

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

/* Image Utilities */
.img-fluid {
  max-width: 100%;
  height: auto;
}

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

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease;
}

.slide-in-right {
  animation: slideInRight 0.8s ease;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .hero-section .display-2 {
    font-size: 2.5rem;
  }
  
  .hero-section {
    padding: 6rem 0 3rem;
    min-height: 70vh;
  }
  
  .navbar-collapse {
    background-color: rgba(26, 26, 46, 0.98);
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: 10px;
  }
  
  .navbar-nav .nav-link {
    padding: 0.8rem 1rem !important;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .flip-card {
    width: 250px;
    height: 350px;
  }
  
  .display-1 {
    font-size: 3rem !important;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .team-card {
    height: 350px;
  }
  
  .btn-lg {
    padding: 0.8rem 2rem !important;
  }
}

@media (max-width: 767.98px) {
  .hero-section .display-2 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1.1rem;
  }
  
  .bi {
    font-size: 2rem;
  }
  
  .card {
    margin-bottom: 1.5rem;
  }
  
  .flip-card {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .team-card {
    height: 300px;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding: 5rem 0 2rem;
  }
  
  .hero-section .display-2 {
    font-size: 1.8rem;
    border-left-width: 4px;
    padding-left: 1rem !important;
  }
  
  .btn-lg {
    padding: 0.7rem 1.5rem !important;
    font-size: 1rem;
  }
  
  section {
    padding: 2rem 0;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

/* Utility Classes */
.z-3 {
  z-index: 3 !important;
}

.min-vh-100 {
  min-height: 100vh !important;
}

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

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

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

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

.d-none {
  display: none !important;
}

.d-lg-block {
  display: block !important;
}

@media (max-width: 991.98px) {
  .d-lg-block {
    display: none !important;
  }
}

.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;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

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

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

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

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--light-text);
  animation: spin 1s ease-in-out infinite;
}

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