/* Crimson Fire Architecture Studio - Custom CSS */

/* === CSS Variables === */
:root {
  --primary-color: #DC143C;
  --secondary-color: #2B2B2B;
  --accent-light: #FF4C6A;
  --accent-dark: #B8112A;
  --text-light: #FFFFFF;
  --text-dark: #2B2B2B;
  --text-muted: #6C757D;
  --bg-light: #FFFFFF;
  --bg-dark: #1A1A1A;
  --border-color: #E5E5E5;
  --shadow-light: 0 2px 10px rgba(220, 20, 60, 0.1);
  --shadow-medium: 0 4px 20px rgba(220, 20, 60, 0.15);
  --shadow-heavy: 0 8px 30px rgba(220, 20, 60, 0.2);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.3s ease;
  --transition-slow: 0.5s ease;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

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

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

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

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

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

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

/* === Bootstrap 5 Overrides === */
.btn {
  border-radius: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 2rem;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
}

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

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

.btn-outline-primary {
  background-color: transparent;
  border-color: var(--primary-color);
  color: 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-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-light);
}

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

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

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25);
}

.card {
  border: none;
  border-radius: 0;
  box-shadow: var(--shadow-light);
  transition: var(--transition-smooth);
  overflow: hidden;
}

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

.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background-color: var(--bg-light);
  box-shadow: var(--shadow-light);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.5rem 1rem;
  position: relative;
  transition: var(--transition-fast);
}

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

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

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

/* === Custom Components === */

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.1) 0%, rgba(43, 43, 43, 0.1) 100%);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(220, 20, 60, 0.05) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-cta {
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Project Gallery */
.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  border-radius: 0;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(220, 20, 60, 0.9), rgba(43, 43, 43, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  transform: translateY(100%);
}

.project-card:hover .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

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

.project-info {
  text-align: center;
  color: var(--text-light);
  padding: 2rem;
}

.project-info h4 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.project-info p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1rem;
}

/* Statistics Section */
.stats-section {
  background: linear-gradient(135deg, var(--secondary-color), var(--bg-dark));
  color: var(--text-light);
  padding: 5rem 0;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

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

.stat-label {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Team Section */
.team-card {
  text-align: center;
  padding: 2rem;
  transition: var(--transition-smooth);
}

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

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

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

.team-name {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

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

/* Contact Section */
.contact-section {
  background-color: #F8F9FA;
  padding: 5rem 0;
}

.contact-info {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 3rem;
  height: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

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

.contact-details h5 {
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.contact-details p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

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

.footer h5 {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.8);
}

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

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: var(--text-light);
  margin-right: 0.5rem;
  transition: var(--transition-fast);
}

.social-links a:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
}

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

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

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

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

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

.section-padding {
  padding: 5rem 0;
}

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

.section-title h2 {
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

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

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

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

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

/* === Mobile Menu === */
.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%2843, 43, 43, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* === Loading Animation === */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: var(--transition-smooth);
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* === Form Validation === */
.form-control.is-invalid {
  border-color: #dc3545;
}

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

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

.valid-feedback {
  display: block;
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
  
  .hero-section {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .contact-info {
    padding: 2rem;
    margin-top: 2rem;
  }
  
  .team-card {
    margin-bottom: 2rem;
  }
  
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .hero-cta .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .project-info {
    padding: 1.5rem;
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    margin-bottom: 2.5rem;
  }
  
  .contact-icon {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

/* === Print Styles === */
@media print {
  .navbar,
  .footer,
  .btn,
  .loading-overlay {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    color: black;
    page-break-after: avoid;
  }
}