/* Crimson Storm Architecture Studio - Custom CSS */

/* Root Variables */
:root {
  --primary-color: #E63946;
  --secondary-color: #1D3557;
  --accent-color: #F1FAEE;
  --text-dark: #2C3E50;
  --text-light: #ECF0F1;
  --gray-light: #BDC3C7;
  --gray-medium: #95A5A6;
  --shadow-light: 0 2px 15px rgba(29, 53, 87, 0.08);
  --shadow-medium: 0 8px 25px rgba(29, 53, 87, 0.12);
  --shadow-heavy: 0 15px 35px rgba(29, 53, 87, 0.2);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, #C73E1D 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, #0F1A2E 100%);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Base Styles & Typography */
* {
  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);
  font-size: 16px;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

p {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.7;
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--gray-medium);
}

/* Bootstrap Overrides */
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

@media (min-width: 768px) {
  .container-fluid {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* Navigation Styles */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(29, 53, 87, 0.1);
  transition: var(--transition-smooth);
  padding: 1rem 0;
}

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

.navbar-brand {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--secondary-color) !important;
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--secondary-color) !important;
  margin: 0 0.5rem;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  transition: var(--transition-smooth);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background: rgba(230, 57, 70, 0.1);
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background: rgba(230, 57, 70, 0.1);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem;
  background: var(--primary-color);
  border-radius: 8px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.25);
}

.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");
}

/* Button Styles */
.btn {
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 12px;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

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

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

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-secondary:hover {
  background: var(--gradient-secondary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 15px;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(29, 53, 87, 0.9) 0%, rgba(230, 57, 70, 0.8) 100%), 
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23ffffff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  animation: heroFadeIn 1.2s ease-out;
}

.hero-title {
  color: white;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  color: var(--accent-color);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 300;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

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

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

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

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

.section-bg-light {
  background: #FAFBFC;
}

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

.section-bg-dark .section-title,
.section-bg-dark h1,
.section-bg-dark h2,
.section-bg-dark h3,
.section-bg-dark h4,
.section-bg-dark h5,
.section-bg-dark h6 {
  color: white;
}

.section-bg-dark p {
  color: var(--accent-color);
}

/* Card Styles */
.card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-light);
  background: white;
}

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

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

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

.card-body {
  padding: 2rem;
}

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

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

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  margin-bottom: 2rem;
}

.portfolio-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.portfolio-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(29, 53, 87, 0.9) 0%, rgba(230, 57, 70, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

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

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

.portfolio-content {
  text-align: center;
  color: white;
  padding: 2rem;
}

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

.portfolio-content p {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

/* Form Styles */
.form-control {
  border: 2px solid #E9ECEF;
  border-radius: 12px;
  padding: 1rem;
  font-size: 1rem;
  transition: var(--transition-smooth);
  background: white;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
  background: white;
}

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

.form-control.is-invalid {
  border-color: var(--primary-color);
  background: white;
}

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

.invalid-feedback {
  color: var(--primary-color);
  font-weight: 500;
}

.valid-feedback {
  color: #28a745;
  font-weight: 500;
}

/* Statistics/Counter Section */
.stats-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  margin-bottom: 2rem;
}

.stats-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.stats-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 1rem;
}

.stats-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Team Section */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  margin: 0 auto 1.5rem;
  transition: var(--transition-smooth);
}

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

.team-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.team-position {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
}

.team-bio {
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

.footer h5 {
  color: white;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.footer p,
.footer a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer a:hover {
  color: white;
  transform: translateX(5px);
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

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

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  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;
}

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

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

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

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

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

.shadow-custom {
  box-shadow: var(--shadow-medium) !important;
}

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

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

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 1000;
  box-shadow: var(--shadow-medium);
}

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

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar-nav {
    background: white;
    padding: 1rem;
    border-radius: 15px;
    margin-top: 1rem;
    box-shadow: var(--shadow-medium);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .portfolio-img {
    height: 250px;
  }
  
  .team-img {
    width: 150px;
    height: 150px;
  }
  
  .stats-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .portfolio-content {
    padding: 1.5rem;
  }
  
  .stats-item {
    padding: 1.5rem;
  }
}