/* Midnight Steel Architecture Studio Theme */
/* ========================================= */

/* CSS Variables for Theme Colors */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #34495E;
  --accent-color: #95A5A6;
  --light-gray: #ECF0F1;
  --dark-gray: #1A252F;
  --white: #FFFFFF;
  --text-primary: #2C3E50;
  --text-secondary: #7F8C8D;
  --text-light: #BDC3C7;
  --hover-color: #1A252F;
  --transition-speed: 0.3s;
  --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.1);
  --shadow-md: 0 4px 6px rgba(44, 62, 80, 0.15);
  --shadow-lg: 0 10px 30px rgba(44, 62, 80, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

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

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

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-speed) ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

.btn {
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  border: 2px solid transparent;
  transition: all var(--transition-speed) ease;
}

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

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

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

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

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

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

.form-control,
.form-select {
  border-radius: 0;
  border: 2px solid var(--light-gray);
  padding: 0.875rem 1rem;
  transition: all var(--transition-speed) ease;
  color: var(--text-primary);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.15);
  color: var(--text-primary);
}

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

.card {
  border: none;
  border-radius: 0;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed) ease;
  overflow: hidden;
}

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

/* Navigation */
.navbar {
  padding: 1.5rem 0;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
}

.navbar.scrolled {
  padding: 1rem 0;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 2px;
}

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

.navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  position: relative;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

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

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
}

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

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  color: var(--primary-color);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid var(--primary-color);
}

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

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

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h100v100H0z" fill="none"/%3E%3Cpath d="M0 0l100 100M100 0L0 100" stroke="%23fff" stroke-width="0.5" opacity="0.1"/%3E%3C/svg%3E');
  opacity: 0.1;
  animation: heroPattern 20s linear infinite;
}

@keyframes heroPattern {
  0% {
    transform: translateX(0) translateY(0);
  }
  100% {
    transform: translateX(100px) translateY(100px);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-section h1,
.hero-section p {
  color: var(--white);
}

.hero-section .lead {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: 2rem;
  opacity: 0.95;
}

/* Section Styles */
section {
  padding: 5rem 0;
}

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

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 1.5rem auto 0;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* Project Cards */
.project-card {
  position: relative;
  overflow: hidden;
  height: 400px;
  background-color: var(--light-gray);
  cursor: pointer;
}

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

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(44, 62, 80, 0.95) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay h3,
.project-overlay p {
  color: var(--white);
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.project-card:hover .project-overlay h3,
.project-card:hover .project-overlay p {
  transform: translateY(0);
}

/* Services Section */
.service-card {
  text-align: center;
  padding: 2.5rem 2rem;
  transition: all var(--transition-speed) ease;
  border: 2px solid transparent;
}

.service-card:hover {
  border-color: var(--primary-color);
  background-color: var(--light-gray);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background-color: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: all var(--transition-speed) ease;
}

.service-card:hover .service-icon {
  background-color: var(--secondary-color);
  transform: rotateY(360deg);
}

/* Team Section */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-member-img {
  width: 250px;
  height: 250px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--light-gray);
  transition: all var(--transition-speed) ease;
}

.team-member:hover .team-member-img {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

.team-member-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.team-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light-gray);
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

.team-social a:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* Testimonials */
.testimonial-card {
  background-color: var(--light-gray);
  padding: 2.5rem;
  position: relative;
  margin-top: 2rem;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 30px;
  font-size: 6rem;
  color: var(--primary-color);
  font-family: Georgia, serif;
  opacity: 0.3;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-color);
}

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

.contact-info {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 2.5rem;
}

.contact-info h3,
.contact-info p {
  color: var(--white);
}

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

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.contact-form {
  background-color: var(--white);
  padding: 2.5rem;
}

.form-error {
  color: #E74C3C;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.active {
  display: block;
}

.form-control.error {
  border-color: #E74C3C;
}

.form-success {
  background-color: #2ECC71;
  color: var(--white);
  padding: 1rem;
  margin-bottom: 1rem;
  display: none;
}

.form-success.active {
  display: block;
}

/* Footer */
footer {
  background-color: var(--dark-gray);
  color: var(--text-light);
  padding: 3rem 0 1.5rem;
}

footer h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

footer a {
  color: var(--text-light);
  display: block;
  margin-bottom: 0.5rem;
  transition: all var(--transition-speed) ease;
}

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

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 45px;
  height: 45px;
  background-color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding-left: 0;
}

.footer-social a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
  z-index: 1000;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

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

.back-to-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-5px);
}

/* Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 50px;
  height: 50px;
  border: 5px solid var(--light-gray);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Animations */
.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

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

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

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

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

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

/* Responsive Design - Mobile First */
@media (max-width: 767.98px) {
  section {
    padding: 3rem 0;
  }

  .navbar-nav {
    padding: 1rem 0;
  }

  .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }

  .hero-section {
    min-height: 80vh;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
  }

  .project-card {
    height: 300px;
  }

  .team-member-img {
    width: 200px;
    height: 200px;
  }

  .contact-form,
  .contact-info {
    padding: 1.5rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (min-width: 768px) {
  .navbar-expand-md .navbar-nav .nav-link {
    padding: 0.5rem 1.25rem;
  }
}

@media (min-width: 992px) {
  .hero-section {
    min-height: 100vh;
  }
}

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

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

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

.bg-light-custom {
  background-color: var(--light-gray);
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
a:focus,
button:focus,
.btn:focus,
.form-control:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .navbar,
  .back-to-top,
  footer {
    display: none;
  }

  body {
    color: #000;
  }

  a {
    text-decoration: underline;
  }
}