/* Midnight Flare Architecture Studio - Custom Styles */

/* CSS Custom Properties */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E67E22;
  --primary-light: #34495E;
  --primary-dark: #1A252F;
  --secondary-light: #F39C12;
  --secondary-dark: #D35400;
  --text-light: #ECF0F1;
  --text-dark: #2C3E50;
  --text-muted: #7F8C8D;
  --background-light: #FFFFFF;
  --background-dark: #1A1A1A;
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.1);
  --shadow-md: 0 4px 12px rgba(44, 62, 80, 0.15);
  --shadow-lg: 0 8px 25px rgba(44, 62, 80, 0.2);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* 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-dark);
  background-color: var(--background-light);
  overflow-x: hidden;
}

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

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

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

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

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

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

/* Bootstrap 5 Overrides */
.btn {
  border-radius: 0;
  font-weight: 600;
  padding: 12px 30px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

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

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

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

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

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

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

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

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

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

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  font-family: 'Playfair Display', serif;
}

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

.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  margin: 0 10px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: var(--transition-fast);
  position: relative;
}

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

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

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
  left: 0;
}

.navbar-toggler {
  border: none;
  padding: 0;
}

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

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(26, 37, 47, 0.9)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23E67E22" fill-opacity="0.1" points="0,0 1000,300 1000,1000 0,700"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  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,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23E67E22" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
  animation: float 20s ease-in-out infinite;
}

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

.hero h1 {
  color: white;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero .btn {
  margin: 0 10px 10px 0;
  animation: fadeInUp 1s ease 0.4s both;
}

/* Section Styles */
.section {
  padding: 80px 0;
  position: relative;
}

.section-dark {
  background: var(--primary-color);
  color: white;
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: white;
}

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

.section-title {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

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

/* Cards */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  overflow: hidden;
  background: white;
}

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

.card-img-top {
  transition: var(--transition-smooth);
}

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

.card-body {
  padding: 30px;
}

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

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

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: var(--primary-color);
}

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

.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.8));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: var(--transition-smooth);
}

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

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

.portfolio-overlay h4 {
  color: white;
  margin-bottom: 10px;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.portfolio-overlay p {
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  transform: translateY(20px);
  transition: var(--transition-smooth) 0.1s;
}

.portfolio-item:hover .portfolio-overlay h4,
.portfolio-item:hover .portfolio-overlay p {
  transform: translateY(0);
}

/* Forms */
.form-control {
  border: 2px solid #E9ECEF;
  border-radius: 4px;
  padding: 12px 15px;
  font-size: 16px;
  transition: var(--transition-fast);
  background: white;
}

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

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

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

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

.invalid-feedback {
  display: block;
  color: #DC3545;
  font-size: 14px;
  margin-top: 5px;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 0 20px;
}

.footer h5 {
  color: white;
  margin-bottom: 20px;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition-fast);
}

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

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

/* Social Links */
.social-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--secondary-color);
  color: white;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.social-links a:hover {
  background: var(--secondary-dark);
  transform: translateY(-3px);
}

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

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.back-to-top.show {
  display: flex;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(230, 126, 34, 0.2);
  border-left: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-nav {
    background: var(--primary-dark);
    padding: 20px;
    border-radius: 8px;
    margin-top: 15px;
  }
  
  .navbar-nav .nav-link {
    margin: 5px 0;
    padding: 10px 15px;
  }
  
  .hero {
    background-attachment: scroll;
    text-align: center;
  }
  
  .section {
    padding: 60px 0;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 80vh;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .lead {
    font-size: 1.1rem;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .card-body {
    padding: 20px;
  }
  
  .btn {
    padding: 10px 25px;
    font-size: 13px;
    width: 100%;
    margin-bottom: 10px;
  }
  
  .portfolio-item img {
    height: 250px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 575.98px) {
  .navbar {
    padding: 0.5rem 0;
  }
  
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .section-title {
    margin-bottom: 40px;
  }
  
  .social-links {
    flex-wrap: wrap;
  }
  
  .footer {
    padding: 40px 0 20px;
    text-align: center;
  }
}

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

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

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

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

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

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