/* Midnight Ember Architecture Studio - CSS */

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

:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --accent-color: #F39C12;
  --light-color: #ECF0F1;
  --dark-color: #1A252F;
  --text-light: #BDC3C7;
  --text-dark: #2C3E50;
  --gradient-primary: linear-gradient(135deg, #2C3E50 0%, #1A252F 100%);
  --gradient-secondary: linear-gradient(135deg, #E74C3C 0%, #C0392B 100%);
  --shadow-light: 0 5px 15px rgba(44, 62, 80, 0.1);
  --shadow-medium: 0 8px 25px rgba(44, 62, 80, 0.15);
  --shadow-heavy: 0 15px 35px rgba(44, 62, 80, 0.2);
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
  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, 2.2rem);
}

p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #555;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-light);
}

/* Bootstrap Overrides */
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 768px) {
  .container-fluid {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* Navigation */
.navbar {
  background: rgba(44, 62, 80, 0.95) !important;
  backdrop-filter: blur(20px);
  padding: 1rem 0;
  transition: all var(--transition-medium);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.navbar-brand {
  font-family: 'Playfair Display', serif !important;
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.navbar-brand:hover {
  color: var(--accent-color) !important;
  transform: translateY(-2px);
}

.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem !important;
  position: relative;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

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

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

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

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

.navbar-toggler:focus {
  box-shadow: none !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='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9rem;
  border: none;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-medium);
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all var(--transition-slow);
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #ffffff;
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(44, 62, 80, 0.3);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: #ffffff;
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
}

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

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(44, 62, 80, 0.2);
}

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

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

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(26, 37, 47, 0.8) 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(243, 156, 18, 0.05) 0%, transparent 50%);
  z-index: 1;
}

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

.hero h1 {
  color: #ffffff;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero .lead {
  animation: fadeInUp 1s ease 0.4s both;
  margin-bottom: 2.5rem;
}

.hero .btn {
  animation: fadeInUp 1s ease 0.6s both;
  margin: 0.5rem;
}

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

.section-dark {
  background: var(--gradient-primary);
  color: #ffffff;
}

.section-light {
  background: #ffffff;
}

.section-accent {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Cards */
.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: all var(--transition-medium);
  background: #ffffff;
  box-shadow: var(--shadow-light);
}

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

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

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

.card-body {
  padding: 2rem;
}

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

.card-text {
  color: #666;
  line-height: 1.6;
}

/* Project Grid */
.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  margin-bottom: 2rem;
  cursor: pointer;
}

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

.project-overlay {
  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.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #ffffff;
  opacity: 0;
  transition: all var(--transition-medium);
  text-align: center;
  padding: 2rem;
}

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

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

.project-overlay h4 {
  color: #ffffff;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

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

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

.team-member img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  border: 5px solid var(--light-color);
  transition: all var(--transition-medium);
}

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

.team-member h5 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.team-member .position {
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

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

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

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

.form-floating .form-control {
  height: calc(3.5rem + 2px);
  line-height: 1.25;
}

.form-floating label {
  color: #6c757d;
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
  color: var(--primary-color);
  font-weight: 600;
}

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

.is-invalid {
  border-color: var(--secondary-color) !important;
}

/* Footer */
.footer {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: #ffffff;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer p,
.footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.footer a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.footer .social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
  margin: 0 0.5rem;
  transition: all var(--transition-medium);
}

.footer .social-links a:hover {
  background: var(--secondary-color);
  color: #ffffff;
  transform: translateY(-3px);
}

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

@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);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

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

/* Loading Animation */
.loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--light-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .project-item img {
    height: 200px;
  }
  
  .team-member img {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .project-overlay {
    padding: 1rem;
  }
  
  .project-overlay h4 {
    font-size: 1.4rem;
  }
}

/* Utilities */
.text-primary {
  color: var(--primary-color) !important;
}

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

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

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

.shadow-custom {
  box-shadow: var(--shadow-medium);
}

.rounded-custom {
  border-radius: 15px;
}

.overlay-hover {
  position: relative;
  overflow: hidden;
}

.overlay-hover::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.8);
  opacity: 0;
  transition: all var(--transition-medium);
}

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