/* Midnight Crystal Architecture Studio Theme */

:root {
  --primary: #2C3E50;
  --secondary: #3498DB;
  --accent: #1ABC9C;
  --dark: #1a252f;
  --light: #ECF0F1;
  --crystal-blue: rgba(52, 152, 219, 0.1);
  --midnight: rgba(44, 62, 80, 0.95);
  --shadow: rgba(0, 0, 0, 0.3);
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--primary);
  line-height: 1.7;
  overflow-x: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Typography */
.display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 800 !important;
  letter-spacing: -0.02em;
  color: var(--primary) !important;
}

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

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

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

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.8;
}

.h2, h2 {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

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

/* Navigation */
.navbar {
  background: var(--midnight) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(52, 152, 219, 0.2);
  padding: 1rem 0;
  transition: var(--transition);
}

.navbar.sticky-top {
  box-shadow: 0 4px 20px var(--shadow);
}

.navbar-dark .navbar-brand {
  color: #ffffff !important;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: var(--transition);
}

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

.navbar-dark .nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1.25rem !important;
  margin: 0 0.25rem;
  border-radius: 8px;
  transition: var(--transition);
  position: relative;
}

.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active {
  color: #ffffff !important;
  background: var(--secondary) !important;
  transform: translateY(-2px);
}

.navbar-dark .nav-link.active {
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

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

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

/* Buttons */
.btn {
  font-weight: 600 !important;
  letter-spacing: 0.03em;
  border: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  font-size: 0.95rem;
}

.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 {
  padding: 1rem 2.5rem !important;
  font-size: 1.1rem !important;
  border-radius: 12px;
}

.btn-primary {
  background: var(--secondary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
  background: #2980b9 !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4) !important;
}

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

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

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

.btn-light:hover {
  background: var(--light) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Hero Section */
.position-relative.w-100.h-100 {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 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="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(52,152,219,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(40px, 40px); }
}

.position-relative.w-100.h-100::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  opacity: 0.15;
  animation: pulse 8s ease-in-out infinite;
}

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

/* Cards */
.card {
  border: none !important;
  border-radius: 16px !important;
  transition: var(--transition);
  overflow: hidden;
  background: #ffffff;
}

.card.shadow-sm {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

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

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

.card-body {
  padding: 2rem;
}

.card-body.p-lg-5 {
  padding: 3rem !important;
}

/* Portfolio Items */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition);
}

.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

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

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

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

/* Filter Buttons */
.filter-btn {
  padding: 0.75rem 1.75rem !important;
  margin: 0.5rem;
  background: #ffffff !important;
  color: var(--primary) !important;
  border: 2px solid var(--light) !important;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary) !important;
  color: #ffffff !important;
  border-color: var(--secondary) !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

/* Forms */
.form-control,
.form-select {
  padding: 0.875rem 1.25rem !important;
  border: 2px solid var(--light) !important;
  border-radius: 10px !important;
  font-size: 1rem;
  transition: var(--transition);
  background: #ffffff !important;
  color: var(--primary) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary) !important;
  box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.15) !important;
  outline: none;
}

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

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

/* Icons */
.bi,
.fas,
.fab,
.fa {
  transition: var(--transition);
}

.bi-arrow-right,
.bi-download {
  font-size: 1.2rem;
}

/* Background Utilities */
.bg-white {
  background: #ffffff !important;
}

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

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

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

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

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

/* Opacity Utilities */
.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

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

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

.my-5 {
  margin-top: 4rem !important;
  margin-bottom: 4rem !important;
}

.p-4 {
  padding: 2rem !important;
}

.p-5 {
  padding: 3rem !important;
}

/* Images */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  transition: var(--transition);
}

.img-fluid:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Rounded Utilities */
.rounded {
  border-radius: 10px !important;
}

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

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

/* Text Decoration */
.text-decoration-none {
  text-decoration: none !important;
}

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

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

.list-unstyled li {
  padding: 0.5rem 0;
  transition: var(--transition);
}

.list-unstyled a {
  color: var(--primary) !important;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

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

/* Alerts */
.alert {
  border-radius: 12px !important;
  padding: 1.25rem !important;
  border: 2px solid !important;
  animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Footer */
footer {
  background: var(--primary) !important;
  color: #ffffff !important;
  padding: 4rem 0 2rem;
  margin-top: 6rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
}

footer h6,
footer .h6 {
  color: #ffffff !important;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

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

footer .bi,
footer .fas,
footer .fab {
  color: var(--secondary);
  font-size: 1.2rem;
}

/* Social Icons */
.bi-facebook,
.bi-instagram,
.bi-linkedin,
.bi-pinterest,
.fa-facebook,
.fa-instagram,
.fa-linkedin {
  font-size: 1.5rem;
  width: 45px;
  height: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
  color: #ffffff !important;
  margin: 0 0.25rem;
}

.bi-facebook:hover,
.bi-instagram:hover,
.bi-linkedin:hover,
.bi-pinterest:hover,
.fa-facebook:hover,
.fa-instagram:hover,
.fa-linkedin:hover {
  background: var(--secondary);
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

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

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

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

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-fade-in-right {
  animation: fadeInRight 0.8s ease-out forwards;
}

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Overlay Effects */
.overlay-effect {
  position: relative;
  overflow: hidden;
}

.overlay-effect::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(52, 152, 219, 0.8) 100%);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.overlay-effect:hover::after {
  opacity: 1;
}

/* Responsive Text Alignment */
@media (max-width: 991.98px) {
  .text-lg-end {
    text-align: left !important;
  }
  
  .text-md-end {
    text-align: left !important;
  }
  
  .text-md-start {
    text-align: left !important;
  }
}

/* Small Devices */
@media (max-width: 575.98px) {
  .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;
  }
  
  .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .p-5 {
    padding: 2rem !important;
  }
}

/* Medium Devices */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar-nav {
    background: rgba(44, 62, 80, 0.95);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
  }
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(52, 152, 219, 0.2);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

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

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

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

.top-0 {
  top: 0 !important;
}

.top-50 {
  top: 50% !important;
}

.start-0 {
  left: 0 !important;
}

.start-50 {
  left: 50% !important;
}

.end-0 {
  right: 0 !important;
}

.bottom-0 {
  bottom: 0 !important;
}

.translate-middle {
  transform: translate(-50%, -50%) !important;
}

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

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

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

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

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

.align-items-center {
  align-items: center !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.align-items-stretch {
  align-items: stretch !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-end {
  justify-content: flex-end !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-row-reverse {
  flex-direction: row-reverse !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

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

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

.ms-auto {
  margin-left: auto !important;
}

.ms-2 {
  margin-left: 0.5rem !important;
}

.ms-4 {
  margin-left: 1.5rem !important;
}

.me-2 {
  margin-left: 0.5rem !important;
}

.me-3 {
  margin-right: 1rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.mt-lg-0 {
  margin-top: 0 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.mb-lg-0 {
  margin-bottom: 0 !important;
}

.mb-md-0 {
  margin-bottom: 0 !important;
}

.my-3 {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

.my-4 {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.px-3 {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.px-4 {
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

.px-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

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

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

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

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

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

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

.ps-lg-5 {
  padding-left: 3rem !important;
}

.pe-lg-5 {
  padding-right: 3rem !important;
}

/* Text Utilities */
.text-center {
  text-align: center !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fs-4 {
  font-size: 1.5rem !important;
}

.fs-5 {
  font-size: 1.25rem !important;
}

.small {
  font-size: 0.875rem !important;
}

/* Border Utilities */
.border {
  border: 1px solid var(--light) !important;
}

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

/* Order Utilities */
@media (min-width: 992px) {
  .order-lg-1 {
    order: 1 !important;
  }
  
  .order-lg-2 {
    order: 2 !important;
  }
  
  .flex-lg-row-reverse {
    flex-direction: row-reverse !important;
  }
}

/* Hover Effects */
a, button {
  cursor: pointer;
}

a:not(.btn):hover {
  opacity: 0.8;
}

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

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

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

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

/* Print Styles */
@media print {
  .navbar,
  footer,
  .btn {
    display: none !important;
  }
}