/* Midnight Crystal Architecture Studio - Custom CSS */

/* CSS Custom Properties */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #3498DB;
  --dark-primary: #1a252f;
  --light-primary: #34495e;
  --light-secondary: #5dade2;
  --dark-secondary: #2980b9;
  --accent-color: #ecf0f1;
  --text-light: #ffffff;
  --text-dark: #2c3e50;
  --text-muted: #7f8c8d;
  --crystal-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --midnight-gradient: linear-gradient(135deg, var(--dark-primary) 0%, var(--primary-color) 100%);
  --crystal-shadow: 0 8px 32px rgba(52, 152, 219, 0.2);
  --midnight-shadow: 0 8px 32px rgba(44, 62, 80, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --border-radius-lg: 20px;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover, a:focus {
  color: var(--dark-secondary);
  text-decoration: none;
}

/* Bootstrap Overrides */
.container {
  max-width: 1200px;
}

/* Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
  padding: 1rem 0;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--crystal-shadow);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.01em;
}

.navbar-brand:hover, .navbar-brand:focus {
  color: var(--secondary-color);
}

.navbar-nav .nav-link {
  color: var(--primary-color);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition-smooth);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--text-light);
  background: var(--crystal-gradient);
  transform: translateY(-2px);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.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='%232C3E50' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Buttons */
.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  padding: 0.75rem 2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--crystal-gradient);
  border: 2px solid transparent;
  color: var(--text-light);
  box-shadow: var(--crystal-shadow);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--midnight-gradient);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(52, 152, 219, 0.3);
  color: var(--text-light);
  border-color: transparent;
}

.btn-outline-primary {
  background: transparent;
  border-color: var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: var(--crystal-shadow);
}

.btn-lg {
  padding: 1rem 3rem;
  font-size: 1rem;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48cGF0dGVybiBpZD0iYSIgcGF0dGVyblVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiBwYXR0ZXJuVHJhbnNmb3JtPSJyb3RhdGUoNDUpIj48cGF0aCBkPSJtLTEwIDMwaDYwdi0yMGgtNjB6IiBmaWxsPSJub25lIiBzdHJva2U9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiIHN0cm9rZS13aWR0aD0iMSIvPjwvcGF0dGVybj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNhKSIvPjwvc3ZnPg==') repeat;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--text-light);
  text-align: center;
}

.hero h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition-smooth);
  overflow: hidden;
  background: white;
}

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

.card-header {
  background: var(--crystal-gradient);
  color: var(--text-light);
  border: none;
  padding: 1.5rem;
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-muted);
  line-height: 1.6;
}

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

.section-title {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--crystal-gradient);
  border-radius: 2px;
}

.bg-light-section {
  background: #f8f9fa;
}

.bg-dark-section {
  background: var(--midnight-gradient);
  color: var(--text-light);
}

.bg-dark-section h1,
.bg-dark-section h2,
.bg-dark-section h3,
.bg-dark-section h4,
.bg-dark-section h5,
.bg-dark-section h6 {
  color: var(--text-light);
}

.bg-dark-section p {
  color: rgba(255, 255, 255, 0.8);
}

/* Forms */
.form-control {
  border-radius: var(--border-radius);
  border: 2px solid #e9ecef;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

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

.form-floating .form-control {
  border-radius: var(--border-radius);
}

.form-floating .form-control:focus,
.form-floating .form-control:not(:placeholder-shown) {
  padding-top: 1.625rem;
  padding-bottom: 0.625rem;
}

.form-floating label {
  color: var(--text-muted);
}

.form-control.is-valid {
  border-color: #28a745;
}

.form-control.is-invalid {
  border-color: #dc3545;
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

/* Gallery */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  cursor: pointer;
}

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

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--crystal-gradient);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 0.9;
}

.gallery-overlay h4 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* Footer */
.footer {
  background: var(--midnight-gradient);
  color: var(--text-light);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.footer a:hover,
.footer a:focus {
  color: var(--light-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  margin-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

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

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

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

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

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

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--crystal-gradient);
  border: none;
  border-radius: 50%;
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1000;
  box-shadow: var(--crystal-shadow);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(52, 152, 219, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--crystal-shadow);
  }
  
  .hero {
    padding: 2rem 0;
    min-height: 90vh;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .gallery-item img {
    height: 250px;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero {
    padding: 1rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .footer {
    padding: 2rem 0 1rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #1a1a1a;
    --secondary-color: #0066cc;
    --text-muted: #333333;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}