/* Storm Blue Architecture Studio Theme */

/* Custom Properties */
:root {
  --primary-color: #1e3a8a;
  --secondary-color: #0ea5e9;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --secondary-dark: #0284c7;
  --secondary-light: #38bdf8;
  --accent-color: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-light: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

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

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

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

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

/* Bootstrap 5 Overrides */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

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

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

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

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

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text-light);
}

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

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

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary-color);
  text-decoration: none;
}

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

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

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

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

.navbar-toggler:focus {
  box-shadow: none;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  z-index: 1050;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu.show {
  display: flex;
}

.mobile-menu .nav-link {
  color: var(--text-light);
  font-size: 1.5rem;
  margin: 1rem 0;
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  animation: slideInUp 0.3s ease forwards;
}

.mobile-menu .nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu .nav-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu .nav-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu .nav-link:nth-child(4) { animation-delay: 0.4s; }
.mobile-menu .nav-link:nth-child(5) { animation-delay: 0.5s; }

.mobile-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
  opacity: 0.3;
}

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

.hero h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s ease 0.3s forwards;
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s ease 0.5s forwards;
}

.hero-buttons {
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s ease 0.7s forwards;
}

.hero-buttons .btn {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

/* Cards */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  overflow: hidden;
}

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

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

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

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 1rem;
}

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

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

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

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  margin: 1rem auto;
  border-radius: 2px;
}

/* Forms */
.form-control {
  border-radius: 8px;
  border: 2px solid var(--border-color);
  padding: 0.75rem 1rem;
  transition: var(--transition);
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

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

.form-floating .form-control {
  height: calc(3.5rem + 2px);
  padding: 1rem 0.75rem;
}

.form-floating label {
  padding: 1rem 0.75rem;
  color: var(--text-secondary);
}

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

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc3545;
}

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

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

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

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

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

/* Animations */
@keyframes slideInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* Utilities */
.bg-primary-gradient {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.bg-secondary-gradient {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

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

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

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

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

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

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

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary {
    border-width: 3px;
  }
  
  .btn-secondary {
    border-width: 3px;
  }
  
  .card {
    border: 2px solid var(--border-color);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
  
  .fade-in,
  .slide-in-left,
  .slide-in-right {
    opacity: 1;
    transform: none;
  }
}