/* Midnight Storm Architecture Studio - Custom Styles */

/* ===========================
   CSS Variables & Root Styles
   =========================== */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E67E22;
  --dark-accent: #1a252f;
  --light-accent: #34495e;
  --text-light: #ecf0f1;
  --text-dark: #2c3e40;
  --background-light: #f8f9fa;
  --background-dark: #1c2833;
  --orange-hover: #d35400;
  --orange-light: #f39c12;
  --transition-speed: 0.3s;
  --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.1);
  --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.15);
  --shadow-lg: 0 8px 32px rgba(44, 62, 80, 0.2);
  --font-primary: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}

/* ===========================
   Base & Typography
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  background-color: var(--background-light);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

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

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

a:hover {
  color: var(--orange-hover);
}

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

/* ===========================
   Bootstrap 5 Overrides
   =========================== */
.btn {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.5rem;
  border: none;
  transition: all var(--transition-speed) ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  background-color: var(--light-accent);
  border-color: var(--light-accent);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active,
.btn-primary:focus {
  background-color: var(--dark-accent);
  border-color: var(--dark-accent);
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-secondary:active,
.btn-secondary:focus {
  background-color: var(--orange-hover);
  border-color: var(--orange-hover);
  color: white;
  box-shadow: var(--shadow-sm);
}

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

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

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

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

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

.form-control,
.form-select {
  border: 2px solid #dce4ec;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all var(--transition-speed) ease;
  background-color: white;
  color: var(--text-dark);
}

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

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

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

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

.form-control.is-valid:focus {
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

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

.invalid-feedback,
.valid-feedback {
  font-size: 0.875rem;
  margin-top: 0.375rem;
}

.card {
  border: none;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  overflow: hidden;
  background-color: white;
}

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

.card-img-top {
  border-radius: 0;
  transition: transform 0.5s ease;
}

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

.card-body {
  padding: 1.5rem;
}

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

.card-text {
  color: var(--text-dark);
}

.navbar {
  transition: all var(--transition-speed) ease;
  padding: 1rem 0;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: all var(--transition-speed) ease;
}

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

.navbar-nav .nav-link {
  color: var(--primary-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  transition: all var(--transition-speed) ease;
  position: relative;
}

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

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

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

.navbar-nav .nav-link.active {
  color: var(--secondary-color);
}

.modal-content {
  border-radius: 1rem;
  border: none;
}

.modal-header {
  background-color: var(--primary-color);
  color: var(--text-light);
  border-bottom: none;
  border-radius: 1rem 1rem 0 0;
}

.modal-title {
  color: var(--text-light);
}

.btn-close {
  filter: brightness(0) invert(1);
}

/* ===========================
   Navigation Styles
   =========================== */
.main-navbar {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.main-navbar.scrolled {
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-toggler {
  border: 2px solid var(--primary-color);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.15);
  outline: 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");
}

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

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(30deg, transparent 12%, rgba(230, 126, 34, 0.05) 12.5%, rgba(230, 126, 34, 0.05) 13%, transparent 13.5%),
    linear-gradient(150deg, transparent 12%, rgba(230, 126, 34, 0.05) 12.5%, rgba(230, 126, 34, 0.05) 13%, transparent 13.5%);
  background-size: 80px 140px;
  opacity: 0.3;
  animation: stormPattern 20s linear infinite;
}

@keyframes stormPattern {
  0% { transform: translateY(0); }
  100% { transform: translateY(140px); }
}

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

.hero-content h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-content p {
  color: var(--text-light);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
}

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

.storm-effect {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 126, 34, 0.2) 0%, transparent 70%);
  animation: stormMove 15s ease-in-out infinite;
  pointer-events: none;
}

.storm-effect:nth-child(1) {
  top: -100px;
  right: -100px;
  animation-delay: 0s;
}

.storm-effect:nth-child(2) {
  bottom: -150px;
  left: -100px;
  animation-delay: 7s;
}

@keyframes stormMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, 50px) scale(1.2); }
  50% { transform: translate(-30px, 80px) scale(0.9); }
  75% { transform: translate(70px, -40px) scale(1.1); }
}

/* ===========================
   Section Styles
   =========================== */
.section {
  padding: 5rem 0;
  position: relative;
}

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

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

.section-dark p {
  color: var(--text-light);
  opacity: 0.95;
}

.section-accent {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--secondary-color);
  border-radius: 2px;
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ===========================
   Project Gallery
   =========================== */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  height: 400px;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  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 0.4s ease;
}

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

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

.project-title {
  color: var(--text-light);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.project-category {
  color: var(--secondary-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.15s;
}

.project-card:hover .project-title,
.project-card:hover .project-category {
  transform: translateY(0);
}

/* ===========================
   Services Section
   =========================== */
.service-item {
  padding: 2.5rem;
  background-color: white;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  height: 100%;
  border-top: 4px solid transparent;
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--secondary-color);
}

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

.service-item:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-description {
  color: var(--text-dark);
  line-height: 1.7;
}

/* ===========================
   Team Section
   =========================== */
.team-member {
  text-align: center;
  transition: all var(--transition-speed) ease;
}

.team-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1.5rem;
  border: 5px solid var(--secondary-color);
  transition: all var(--transition-speed) ease;
  box-shadow: var(--shadow-md);
}

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

.team-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

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

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

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-speed) ease;
}

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

/* ===========================
   Testimonials
   =========================== */
.testimonial-card {
  background-color: white;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  margin-top: 2rem;
}

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

.testimonial-text {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary-color);
}

.author-info h5 {
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.author-info p {
  margin: 0;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

/* ===========================
   Contact Section
   =========================== */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

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

.contact-details p {
  margin: 0;
  color: var(--text-dark);
}

.contact-details a {
  color: var(--secondary-color);
  font-weight: 600;
}

.contact-details a:hover {
  color: var(--orange-hover);
}

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

.footer h5 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer p,
.footer li {
  color: var(--text-light);
  opacity: 0.9;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-light);
  transition: all var(--transition-speed) ease;
  opacity: 0.9;
}

.footer-links a:hover {
  color: var(--secondary-color);
  opacity: 1;
  padding-left: 5px;
}

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

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

.footer-social .social-link {
  background-color: rgba(255, 255, 255, 0.1);
}

.footer-social .social-link:hover {
  background-color: var(--secondary-color);
}

/* ===========================
   Stats Section
   =========================== */
.stats-section {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-accent));
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.stat-item {
  text-align: center;
  color: var(--text-light);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-light);
  opacity: 0.95;
}

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

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

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

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

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

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

.scale-in {
  animation: scaleIn 0.5s ease forwards;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

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

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

.back-to-top:hover {
  background-color: var(--orange-hover);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    box-shadow: var(--shadow-md);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
  
  .hero-section {
    min-height: 70vh;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .project-card {
    height: 300px;
    margin-bottom: 1.5rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: 60vh;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .service-item,
  .testimonial-card {
    padding: 1.5rem;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .team-photo {
    width: 150px;
    height: 150px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  .section {
    padding: 2rem 0;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-label {
    font-size: 1rem;
  }
  
  .project-card {
    height: 250px;
  }
  
  .contact-info-item {
    gap: 1rem;
  }
  
  .contact-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

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

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

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

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

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

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

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

.rounded-custom {
  border-radius: 1rem;
}

/* Print Styles */
@media print {
  .navbar,
  .back-to-top,
  .footer-social {
    display: none;
  }
  
  body {
    background-color: white;
    color: black;
  }
}