/* Midnight Forge Architecture Studio - CSS */

/* CSS Variables */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E67E22;
  --primary-dark: #1a252f;
  --primary-light: #34495e;
  --secondary-dark: #d35400;
  --secondary-light: #f39c12;
  --white: #ffffff;
  --light-gray: #ecf0f1;
  --dark-gray: #7f8c8d;
  --text-dark: #2c3e50;
  --text-light: #95a5a6;
  --shadow: rgba(44, 62, 80, 0.1);
  --shadow-dark: rgba(44, 62, 80, 0.2);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global 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);
  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;
}

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

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

p {
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

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

a:hover {
  color: var(--secondary-dark);
}

/* Bootstrap Overrides */
.btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: none;
  font-size: 0.9rem;
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 126, 34, 0.3);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

.form-control {
  border: 2px solid var(--light-gray);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(230, 126, 34, 0.25);
}

/* Header & Navigation */
.navbar {
  background-color: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: var(--transition);
  box-shadow: 0 2px 20px var(--shadow);
}

.navbar.scrolled {
  background-color: var(--primary-color);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.navbar-nav .nav-link {
  color: var(--white);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.3rem;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--secondary-color);
  background-color: rgba(230, 126, 34, 0.1);
}

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

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

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(230,126,34,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
}

.hero-title {
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  color: var(--light-gray);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
  animation: fadeInUp 1s ease-out 0.4s both;
}

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

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

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

/* Services Section */
.service-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 10px 30px var(--shadow);
  transition: var(--transition);
  height: 100%;
  border: 1px solid rgba(44, 62, 80, 0.1);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary-color), var(--secondary-light));
  transform: scaleX(0);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-dark);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--white);
}

.service-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.service-description {
  color: var(--text-light);
  line-height: 1.6;
}

/* Portfolio Section */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px var(--shadow);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px var(--shadow-dark);
}

.portfolio-image {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 3rem;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.9), rgba(230, 126, 34, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

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

.portfolio-content {
  text-align: center;
  color: var(--white);
  transform: translateY(20px);
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-content {
  transform: translateY(0);
}

.portfolio-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.portfolio-category {
  color: var(--light-gray);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

/* About Section */
.about-section {
  background-color: var(--light-gray);
}

.stats-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stats-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--secondary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stats-label {
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Contact Section */
.contact-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
}

.contact-section .section-title {
  color: var(--white);
}

.contact-info {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 1.2rem;
  color: var(--white);
}

.contact-details h4 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-details p {
  color: var(--light-gray);
  margin: 0;
}

.contact-form {
  background: var(--white);
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Footer */
.footer {
  background-color: var(--primary-dark);
  color: var(--light-gray);
  padding: 3rem 0 1rem;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--light-gray);
}

.social-links {
  margin-bottom: 2rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  margin: 0 0.5rem;
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-link:hover {
  background: var(--secondary-color);
  color: var(--white);
  transform: translateY(-3px);
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 1s ease-out;
}

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

/* Utility Classes */
.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

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

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

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 3px solid rgba(230, 126, 34, 0.3);
  border-radius: 50%;
  border-top: 3px solid var(--secondary-color);
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Form Validation Styles */
.form-control.is-valid {
  border-color: #28a745;
}

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

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

.valid-feedback {
  display: block;
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .navbar-nav {
    background-color: var(--primary-dark);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
  }
  
  .hero-section {
    text-align: center;
    padding: 2rem 0;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .service-card {
    margin-bottom: 2rem;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .contact-info {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .portfolio-image {
    height: 250px;
    font-size: 2rem;
  }
  
  .stats-number {
    font-size: 2.5rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .service-card {
    border: 2px solid var(--primary-color);
  }
  
  .btn-primary {
    border: 2px solid var(--secondary-dark);
  }
}

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