/* Midnight Crimson Architecture Studio - Complete CSS */

/* ==================== ROOT VARIABLES ==================== */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --dark-bg: #1a252f;
  --light-text: #ecf0f1;
  --accent-gold: #f39c12;
  --transition-base: all 0.3s ease;
  --shadow-base: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ==================== 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: #f8f9fa !important;
  overflow-x: hidden;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

/* ==================== NAVIGATION ==================== */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%) !important;
  padding: 1rem 0 !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
  transition: var(--transition-base);
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  padding: 0.5rem 0 !important;
  background: rgba(44, 62, 80, 0.98) !important;
}

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

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

.navbar-dark .navbar-toggler {
  border-color: var(--secondary-color) !important;
  background-color: rgba(231, 76, 60, 0.2) !important;
}

.navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

.navbar-nav {
  align-items: center;
}

.nav-item {
  margin: 0 0.5rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 5px;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

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

.nav-link:hover,
.nav-link.active {
  color: #ffffff !important;
  background-color: rgba(231, 76, 60, 0.2) !important;
  transform: translateY(-2px);
}

.nav-link.active {
  background-color: var(--secondary-color) !important;
  color: #ffffff !important;
}

/* ==================== HERO SECTION ==================== */
.position-relative.w-100.h-100 {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 50%, #000000 100%);
  position: relative;
  overflow: hidden;
}

.position-relative.w-100.h-100::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(231,76,60,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); }
}

.position-absolute.top-50.start-50.translate-middle {
  z-index: 10;
  max-width: 1200px;
  padding: 2rem;
}

.text-white.display-2 {
  color: #ffffff !important;
  font-weight: 800 !important;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
  letter-spacing: 2px;
}

.lead {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.3rem !important;
  font-weight: 300 !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1.2s ease-out;
  max-width: 800px;
  margin-left: auto !important;
  margin-right: auto !important;
}

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

/* ==================== BUTTONS ==================== */
.btn {
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 8px !important;
  transition: var(--transition-base) !important;
  border: none !important;
  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 {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #c0392b 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4) !important;
}

.btn-lg:hover {
  background: linear-gradient(135deg, #c0392b 0%, var(--secondary-color) 100%) !important;
  color: #ffffff !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.6) !important;
}

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

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

.btn-sm {
  padding: 0.4rem 1rem !important;
  font-size: 0.9rem !important;
}

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

.container,
.container-fluid {
  position: relative;
}

.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-weight: 700 !important;
  color: var(--primary-color) !important;
  margin-bottom: 1.5rem !important;
}

.display-3 {
  position: relative;
  display: inline-block;
}

.display-3::after,
.display-4::after,
.display-5::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color) 0%, transparent 100%);
  border-radius: 2px;
}

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

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

/* ==================== CARDS ==================== */
.card {
  border: none !important;
  border-radius: 15px !important;
  transition: var(--transition-base) !important;
  overflow: hidden;
  background-color: #ffffff !important;
}

.card:hover {
  transform: translateY(-10px) !important;
  box-shadow: var(--shadow-hover) !important;
}

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

.card-title {
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
}

.card-text {
  color: #6c757d !important;
  line-height: 1.8 !important;
}

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

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

.service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  border-left: 4px solid var(--secondary-color) !important;
  transition: var(--transition-base);
}

.service-card:hover {
  border-left-width: 8px !important;
  background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%) !important;
}

/* ==================== IMAGES ==================== */
.img-fluid {
  border-radius: 15px;
  transition: var(--transition-base);
}

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

.shadow-lg {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

.shadow,
.shadow-sm {
  box-shadow: var(--shadow-base) !important;
}

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

.rounded-circle {
  border-radius: 50% !important;
}

.rounded-pill {
  border-radius: 50rem !important;
}

/* ==================== PORTFOLIO ==================== */
.filter-btn {
  padding: 0.6rem 1.5rem !important;
  margin: 0.5rem !important;
  background-color: #ffffff !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
  cursor: pointer;
  transition: var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--secondary-color) !important;
  color: #ffffff !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  transition: var(--transition-base);
  background-color: #ffffff;
  box-shadow: var(--shadow-base);
}

.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(231, 76, 60, 0.9) 100%);
  opacity: 0;
  transition: var(--transition-base);
  z-index: 1;
}

.portfolio-item:hover::before {
  opacity: 1;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition-base);
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

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

/* ==================== ICONS ==================== */
.bi {
  display: inline-block;
  vertical-align: middle;
  font-size: 1.5rem;
}

.bi-building,
.bi-house-heart,
.bi-tree,
.bi-grid-3x3,
.bi-bank,
.bi-map {
  font-size: 3rem !important;
  color: var(--secondary-color) !important;
  margin-bottom: 1rem;
}

.bi-chat-dots,
.bi-lightbulb,
.bi-graph-up,
.bi-people,
.bi-droplet-fill,
.bi-tree-fill,
.bi-recycle,
.bi-award-fill,
.bi-people-fill,
.bi-journal-text,
.bi-mic-fill {
  color: var(--secondary-color) !important;
}

.bi-facebook,
.bi-instagram,
.bi-linkedin,
.bi-twitter {
  font-size: 1.5rem !important;
  color: #ffffff !important;
  transition: var(--transition-base);
}

.bi-facebook:hover { color: #3b5998 !important; }
.bi-instagram:hover { color: #E1306C !important; }
.bi-linkedin:hover { color: #0077b5 !important; }
.bi-twitter:hover { color: #1DA1F2 !important; }

.bi-1-circle-fill,
.bi-2-circle-fill,
.bi-3-circle-fill,
.bi-4-circle-fill {
  font-size: 3rem !important;
  color: var(--secondary-color) !important;
}

.bi-check-circle-fill {
  color: #28a745 !important;
}

.bi-arrow-right,
.bi-arrow-down {
  transition: var(--transition-base);
}

.btn:hover .bi-arrow-right {
  transform: translateX(5px);
}

/* ==================== FORMS ==================== */
.needs-validation {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow-base);
}

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

.form-control,
.form-select {
  border: 2px solid #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  transition: var(--transition-base) !important;
  background-color: #f8f9fa !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.25) !important;
  background-color: #ffffff !important;
}

.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(--primary-color) !important;
  cursor: pointer;
}

.invalid-feedback {
  color: var(--secondary-color) !important;
  font-weight: 500 !important;
}

/* ==================== FOOTER ==================== */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%) !important;
  color: #ffffff !important;
  padding: 4rem 0 2rem !important;
  margin-top: 5rem;
}

footer h3,
footer h4,
footer h5 {
  color: #ffffff !important;
  font-weight: 700 !important;
}

footer .list-unstyled li {
  margin-bottom: 0.8rem;
}

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

footer a:hover {
  color: var(--secondary-color) !important;
  padding-left: 5px;
}

.border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ==================== MODAL ==================== */
.modal-content {
  border-radius: 15px !important;
  border: none !important;
  background-color: var(--primary-color) !important;
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-bg) 100%) !important;
}

.modal-title {
  color: #ffffff !important;
  font-weight: 700 !important;
}

.modal-body {
  background-color: #ffffff !important;
  border-radius: 0 0 15px 15px !important;
}

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

.btn-close:hover {
  transform: rotate(90deg);
}

/* ==================== UTILITIES ==================== */
.bg-white {
  background-color: #ffffff !important;
}

.bg-light {
  background-color: #f8f9fa !important;
}

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

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

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

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

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

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

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

.gap-5 {
  gap: 3rem !important;
}

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

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

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

.g-5 {
  --bs-gutter-x: 3rem !important;
  --bs-gutter-y: 3rem !important;
}

/* ==================== RATIO ==================== */
.ratio {
  position: relative;
  width: 100%;
}

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

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

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

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@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 pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

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

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(44, 62, 80, 0.98);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }
  
  .navbar-nav {
    gap: 0.5rem !important;
  }
  
  .nav-link {
    padding: 0.8rem 1rem !important;
    margin: 0.2rem 0;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.8rem !important;
  }
  
  .lead {
    font-size: 1.1rem !important;
  }
  
  .btn-lg {
    padding: 0.8rem 2rem !important;
    font-size: 1rem !important;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .position-sticky {
    position: relative !important;
    top: auto;
  }
}

@media (max-width: 767.98px) {
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .modal-dialog {
    margin: 0.5rem !important;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.3rem !important;
  }
  
  .display-2 {
    font-size: 1.8rem !important;
  }
  
  .lead {
    font-size: 1rem !important;
  }
  
  .btn-lg {
    padding: 0.6rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
  
  .bi-building,
  .bi-house-heart,
  .bi-tree,
  .bi-grid-3x3,
  .bi-bank,
  .bi-map {
    font-size: 2rem !important;
  }
}

/* ==================== SCROLLBAR STYLING ==================== */
::-webkit-scrollbar {
  width: 12px;
}

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

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

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

/* ==================== SELECTION ==================== */
::selection {
  background-color: var(--secondary-color);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--secondary-color);
  color: #ffffff;
}

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

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid rgba(231, 76, 60, 0.3);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ==================== PRINT STYLES ==================== */
@media print {
  .navbar,
  .btn,
  footer,
  .modal {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}