/* Fire Storm Architecture Studio Theme - CSS */

/* Root Variables */
:root {
  --primary-color: #C41E3A;
  --secondary-color: #2C3E50;
  --primary-light: #E94560;
  --primary-dark: #A01729;
  --secondary-light: #34495E;
  --secondary-dark: #1A252F;
  --accent-color: #F39C12;
  --text-dark: #2C3E50;
  --text-light: #FFFFFF;
  --text-muted: #7F8C8D;
  --bg-light: #F8F9FA;
  --bg-dark: #1A1A1A;
  --border-color: #E9ECEF;
  --shadow-light: rgba(196, 30, 58, 0.1);
  --shadow-medium: rgba(196, 30, 58, 0.2);
  --shadow-dark: rgba(196, 30, 58, 0.3);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  --gradient-fire: linear-gradient(45deg, #C41E3A, #E94560, #F39C12);
}

/* Base Reset & 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);
  background-color: #FFFFFF;
  overflow-x: hidden;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  background: var(--gradient-fire);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: fireGradient 3s ease-in-out infinite;
}

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

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

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

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

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

/* Animations */
@keyframes fireGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

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

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes flame {
  0%, 100% {
    transform: rotate(-1deg) scale(1);
  }
  50% {
    transform: rotate(1deg) scale(1.02);
  }
}

/* Utility Classes */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

.scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.text-gradient {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fire-effect {
  position: relative;
  overflow: hidden;
}

.fire-effect::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.3), transparent);
  animation: flame 2s ease-in-out infinite;
  z-index: 1;
}

/* Bootstrap 5 Overrides */
.btn {
  border-radius: 0.5rem;
  font-weight: 600;
  padding: 0.75rem 2rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}

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

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

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

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

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--text-light);
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
}

.btn-secondary:hover {
  background: var(--gradient-secondary);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3);
}

.card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-header {
  background: var(--gradient-primary);
  color: var(--text-light);
  border: none;
  font-weight: 600;
}

.navbar {
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

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

.navbar-brand {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--primary-color);
}

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

.navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color);
  background: rgba(196, 30, 58, 0.1);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color);
  background: rgba(196, 30, 58, 0.1);
}

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

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

/* Header Styles */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.9), rgba(44, 62, 80, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ff6b35" points="0,1000 1000,800 1000,1000"/><polygon fill="%23f7931e" points="1000,600 0,800 0,1000 1000,1000"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="2"/></g></svg>') repeat;
  animation: flame 4s ease-in-out infinite;
}

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

.hero-content h1 {
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
  background: none;
  -webkit-text-fill-color: initial;
}

.hero-content p {
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* 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;
}

/* Project Grid */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  height: 300px;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.5s ease;
}

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

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

.project-card:hover .project-overlay {
  opacity: 0.9;
}

.project-overlay h4 {
  color: var(--text-light);
  margin-bottom: 1rem;
  transform: translateY(20px);
  transition: all 0.3s ease 0.1s;
}

.project-overlay p {
  color: rgba(255, 255, 255, 0.9);
  transform: translateY(20px);
  transition: all 0.3s ease 0.2s;
}

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

/* Services Section */
.service-card {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 1rem;
  background: var(--bg-light);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: all 0.3s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

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

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

/* Contact Form */
.form-control {
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  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 var(--shadow-light);
  background: #ffffff;
}

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

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

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

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

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.footer a:hover {
  color: var(--text-light);
  text-decoration: none;
}

.social-links a {
  display: inline-block;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  text-align: center;
  line-height: 45px;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
}

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

/* Mobile Menu */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

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

.navbar-toggler-icon {
  background-image: none;
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
  transition: all 0.3s ease;
  position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 1px;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
  top: -8px;
}

.navbar-toggler-icon::after {
  bottom: -8px;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(196, 30, 58, 0.3);
  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); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero-section {
    background-attachment: scroll;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .project-card {
    height: 250px;
    margin-bottom: 2rem;
  }
  
  .service-card {
    margin-bottom: 2rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .service-card,
  .project-card {
    margin-bottom: 1.5rem;
  }
  
  .navbar-nav {
    text-align: center;
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.navbar-nav .nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #B91C3C;
    --secondary-color: #1F2937;
    --text-muted: #374151;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}