/* Architectural Studio - Cosmic Navy & Solar Orange Theme */

/* CSS Custom Properties */
:root {
  --primary-color: #1a237e;
  --secondary-color: #ff6f00;
  --primary-light: #3f51b5;
  --primary-dark: #0d1660;
  --secondary-light: #ff9800;
  --secondary-dark: #e65100;
  --text-primary: #ffffff;
  --text-secondary: #e8eaf6;
  --text-dark: #212121;
  --text-muted: #757575;
  --bg-light: #f5f5f5;
  --bg-dark: #0a0f4a;
  --shadow-light: rgba(26, 35, 126, 0.1);
  --shadow-medium: rgba(26, 35, 126, 0.2);
  --shadow-heavy: rgba(26, 35, 126, 0.3);
  --gradient-cosmic: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  --gradient-solar: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
  --gradient-hero: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: #ffffff;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

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

.lead {
  font-size: 1.25rem;
  font-weight: 400;
}

/* Bootstrap 5 Overrides */
.btn {
  padding: 12px 32px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.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: left 0.5s ease;
}

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

.btn-primary {
  background: var(--gradient-cosmic);
  color: var(--text-primary);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

.btn-primary:hover {
  background: var(--gradient-cosmic);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-heavy);
}

.btn-secondary {
  background: var(--gradient-solar);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(255, 111, 0, 0.3);
}

.btn-secondary:hover {
  background: var(--gradient-solar);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 111, 0, 0.4);
}

.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(--text-primary);
  border-color: var(--primary-color);
}

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

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

/* Navbar Styles */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 35, 126, 0.1);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px var(--shadow-light);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-color);
  text-decoration: none;
}

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

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  position: relative;
  transition: all 0.3s ease;
}

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

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

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

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

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

.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%2826, 35, 126, 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-hero);
  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;
}

.hero h1 {
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero .lead {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

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

/* Floating Elements Animation */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.floating-element {
  position: absolute;
  opacity: 0.1;
  animation: float 20s linear infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-element:nth-child(2) {
  top: 60%;
  right: 10%;
  animation-delay: -5s;
}

.floating-element:nth-child(3) {
  top: 80%;
  left: 30%;
  animation-delay: -10s;
}

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

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

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

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

.section-accent {
  background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
}

/* Cards */
.card {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--shadow-light);
  height: 100%;
}

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

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: all 0.3s ease;
}

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

.card-body {
  padding: 2rem;
}

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

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

/* Service Cards */
.service-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 3rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px var(--shadow-light);
  border: 1px solid rgba(26, 35, 126, 0.05);
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  border-color: var(--primary-color);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  background: var(--gradient-solar);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

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

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 2rem;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26, 35, 126, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

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

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

.portfolio-content {
  text-align: center;
  color: var(--text-primary);
  padding: 2rem;
}

.portfolio-content h4 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

/* Forms */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.1);
  background: #ffffff;
}

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

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

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

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

/* Contact Section */
.contact-info {
  background: #ffffff;
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 4px 20px var(--shadow-light);
  height: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(26, 35, 126, 0.05);
}

.contact-item:hover {
  background: var(--bg-light);
  transform: translateX(10px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-solar);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
  font-size: 1.5rem;
  color: var(--text-primary);
}

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

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

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-secondary);
  padding: 60px 0 20px;
}

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

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

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

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

.footer-links a {
  position: relative;
  padding-left: 1rem;
}

.footer-links a::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary-color);
  transition: all 0.3s ease;
}

.footer-links a:hover::before {
  transform: translateX(5px);
}

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

.social-icon {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-icon:hover {
  background: var(--secondary-color);
  color: var(--text-primary);
  transform: translateY(-3px);
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(90deg);
  }
  50% {
    transform: translateY(0) rotate(180deg);
  }
  75% {
    transform: translateY(-10px) rotate(270deg);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

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

/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(26, 35, 126, 0.1);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

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

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

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

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

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

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

.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

/* Mobile First Responsive Design */
@media (max-width: 575.98px) {
  .section {
    padding: 60px 0;
  }
  
  .hero {
    text-align: center;
    padding: 0 15px;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .service-card,
  .contact-info {
    padding: 2rem 1.5rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
  
  .navbar-nav {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 4px 20px var(--shadow-light);
  }
}

@media (min-width: 576px) {
  .btn {
    display: inline-block;
    width: auto;
  }
}

@media (max-width: 767.98px) {
  .portfolio-item img {
    height: 250px;
  }
  
  .floating-elements {
    display: none;
  }
}

@media (min-width: 768px) {
  .hero {
    text-align: left;
  }
  
  .contact-item {
    flex-direction: row;
    text-align: left;
  }
  
  .contact-icon {
    margin-right: 1.5rem;
    margin-bottom: 0;
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 4px 20px var(--shadow-light);
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .service-icon,
  .contact-icon {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
  
  .floating-elements {
    display: none;
  }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .floating-elements {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .section {
    page-break-inside: avoid;
  }
}