/* Storm Midnight Architecture Studio CSS */

/* CSS Custom Properties */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --dark-shade: #1A252F;
  --light-shade: #34495E;
  --accent-light: #ECF0F1;
  --text-light: #BDC3C7;
  --text-dark: #2C3E50;
  --white: #FFFFFF;
  --shadow-light: rgba(44, 62, 80, 0.1);
  --shadow-medium: rgba(44, 62, 80, 0.2);
  --shadow-heavy: rgba(44, 62, 80, 0.3);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--dark-shade));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #C0392B);
  --transition-fast: all 0.3s ease;
  --transition-medium: all 0.5s ease;
  --transition-slow: all 0.8s ease;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  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);
  letter-spacing: -0.02em;
}

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

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

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

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

/* Bootstrap 5 Overrides */
.container-fluid {
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 576px) {
  .container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

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

.navbar.scrolled {
  background: var(--primary-color) !important;
  padding: 0.5rem 0;
  box-shadow: 0 4px 30px var(--shadow-medium);
}

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

.navbar-brand:hover {
  color: var(--secondary-color) !important;
  transform: scale(1.05);
}

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

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

.navbar-nav .nav-link:hover {
  color: var(--white) !important;
  transform: translateY(-2px);
}

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

.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, 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: var(--gradient-primary);
  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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.05" points="0,1000 1000,0 1000,1000"/></svg>') no-repeat center center;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px var(--shadow-heavy);
}

.hero .lead {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-bottom: 2.5rem;
  color: var(--accent-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
  border: none;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
}

.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: var(--transition-medium);
}

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

.btn-primary {
  background: var(--secondary-color);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-primary:hover {
  background: #C0392B;
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

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

.btn-outline-light:hover {
  background: var(--white);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-light);
}

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

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

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

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

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

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

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

/* Cards */
.card {
  border: none;
  border-radius: 15px;
  overflow: hidden;
  transition: var(--transition-medium);
  background: var(--white);
  box-shadow: 0 5px 25px var(--shadow-light);
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px var(--shadow-medium);
}

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

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

.card-body {
  padding: 2rem;
}

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

.card-text {
  color: var(--light-shade);
  margin-bottom: 1.5rem;
}

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

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: var(--transition-fast);
  color: var(--white);
  text-align: center;
  padding: 2rem;
}

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

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

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

.portfolio-overlay p {
  color: var(--accent-light);
  transform: translateY(20px);
  transition: var(--transition-fast);
  transition-delay: 0.1s;
}

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

/* Team Cards */
.team-card {
  text-align: center;
  background: var(--white);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 5px 25px var(--shadow-light);
  transition: var(--transition-medium);
  height: 100%;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px var(--shadow-medium);
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  overflow: hidden;
  border: 4px solid var(--secondary-color);
  transition: var(--transition-fast);
}

.team-card:hover .team-avatar {
  transform: scale(1.05);
}

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

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

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(231, 76, 60, 0.1);
  background: var(--white);
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-error {
  color: var(--secondary-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-success {
  color: #27AE60;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

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

.footer h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

.footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-block;
}

.footer a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

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

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.social-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--light-shade);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 1.2rem;
}

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

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

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

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

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

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out;
}

/* Scroll Indicator */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 4px;
  background: var(--secondary-color);
  z-index: 9999;
  transition: width 0.3s ease;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary-color);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

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

.back-to-top:hover {
  background: var(--primary-color);
  transform: translateY(-3px) scale(1.1);
}

/* Loading Spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-nav {
    background: var(--primary-color);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
    box-shadow: 0 10px 30px var(--shadow-medium);
  }
  
  .navbar-nav .nav-link {
    margin: 0.5rem 0;
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition-fast);
  }
  
  .navbar-nav .nav-link:hover {
    background: var(--light-shade);
    transform: none;
  }
  
  .hero {
    min-height: 70vh;
    text-align: center;
  }
  
  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 767.98px) {
  .hero {
    min-height: 60vh;
    padding: 2rem 0;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero .lead {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    margin: 0.25rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .team-avatar {
    width: 100px;
    height: 100px;
  }
  
  .portfolio-item img {
    height: 250px;
  }
  
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero {
    min-height: 50vh;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .portfolio-item img {
    height: 200px;
  }
  
  .team-card {
    padding: 1.5rem;
  }
  
  .social-icons {
    justify-content: center;
    flex-wrap: wrap;
  }
}

/* High Resolution Displays */
@media (min-width: 1400px) {
  .container-fluid {
    max-width: 1320px;
    margin: 0 auto;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .back-to-top,
  .scroll-indicator {
    display: none !important;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  * {
    color: #000 !important;
    background: transparent !important;
  }
}