/* Storm & Fire Architecture Studio - Custom Styles */

:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --primary-light: #34495E;
  --secondary-light: #F39C12;
  --dark-gray: #1A252F;
  --light-gray: #95A5A6;
  --white: #FFFFFF;
  --black: #2C3E50;
  --storm-blue: #3498DB;
  --fire-orange: #F39C12;
  --text-light: #BDC3C7;
  --shadow-light: rgba(44, 62, 80, 0.1);
  --shadow-medium: rgba(44, 62, 80, 0.2);
  --shadow-dark: rgba(44, 62, 80, 0.3);
  --gradient-storm: linear-gradient(135deg, var(--primary-color) 0%, var(--storm-blue) 100%);
  --gradient-fire: linear-gradient(135deg, var(--secondary-color) 0%, var(--fire-orange) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(44, 62, 80, 0.9) 0%, rgba(231, 76, 60, 0.8) 100%);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--primary-color);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-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.2rem);
}

p {
  font-size: 1.1rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

/* Bootstrap 5 Overrides */
.btn {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 0;
  padding: 0.75rem 2rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  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;
}

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

.btn-primary {
  background: var(--gradient-storm);
  border-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--shadow-medium);
}

.btn-secondary {
  background: var(--gradient-fire);
  border-color: var(--secondary-color);
  color: var(--white);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--fire-orange);
  border-color: var(--fire-orange);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--white);
}

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

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--white);
}

/* Card Overrides */
.card {
  border: none;
  border-radius: 0;
  box-shadow: 0 5px 20px var(--shadow-light);
  transition: all 0.3s ease;
  overflow: hidden;
}

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

.card-header {
  background: var(--gradient-storm);
  color: var(--white);
  border-bottom: none;
  font-weight: 600;
}

/* Navigation */
.navbar {
  background: rgba(44, 62, 80, 0.95) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.navbar.scrolled {
  background: var(--primary-color) !important;
  padding: 0.5rem 0;
  box-shadow: 0 2px 20px var(--shadow-medium);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  color: var(--text-light) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  position: relative;
}

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

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

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
  left: 0;
}

.navbar-toggler {
  border: none;
  padding: 0;
  font-size: 1.2rem;
}

.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%28255, 255, 255, 0.8%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="storm" patternUnits="userSpaceOnUse" width="20" height="20"><path d="M0,20L20,0" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23storm)"/></svg>') repeat;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, 20px); }
}

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

.hero-title {
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  margin-bottom: 1.5rem;
  animation: slideInUp 1s ease-out;
}

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

.hero-buttons {
  animation: slideInUp 1s ease-out 0.4s both;
}

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

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

.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: 3px;
  background: var(--gradient-fire);
}

/* Project Cards */
.project-card {
  position: relative;
  overflow: hidden;
  height: 300px;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 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-hero);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
}

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

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

.project-overlay p {
  color: var(--text-light);
  transform: translateY(20px);
  transition: transform 0.3s ease 0.2s;
}

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

/* Services */
.service-item {
  text-align: center;
  padding: 2rem;
  transition: all 0.3s ease;
  border-radius: 8px;
}

.service-item:hover {
  background: var(--white);
  box-shadow: 0 10px 30px var(--shadow-light);
  transform: translateY(-5px);
}

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

.service-item:hover .service-icon {
  background: var(--gradient-fire);
  transform: scale(1.1);
}

/* Team */
.team-member {
  text-align: center;
  transition: all 0.3s ease;
}

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

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.team-social {
  margin-top: 1rem;
}

.team-social a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  line-height: 40px;
  text-align: center;
  margin: 0 0.5rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

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

/* Contact Form */
.contact-form {
  background: var(--white);
  padding: 3rem;
  box-shadow: 0 10px 40px var(--shadow-light);
  border-radius: 8px;
}

.form-control {
  border: 2px solid #E9ECEF;
  border-radius: 0;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

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

.form-control.is-invalid {
  border-color: var(--secondary-color);
}

.invalid-feedback {
  color: var(--secondary-color);
}

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

.footer h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--primary-light);
  padding-top: 1rem;
  margin-top: 2rem;
  text-align: center;
}

/* Loading Animation */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-storm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

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

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid var(--white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-fire);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

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

.scroll-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero {
    min-height: 70vh;
    text-align: center;
  }
  
  .hero-buttons .btn {
    margin: 0.5rem;
    display: block;
    width: 100%;
    max-width: 250px;
  }
  
  .contact-form {
    padding: 2rem 1rem;
  }
  
  .project-card {
    height: 250px;
    margin-bottom: 2rem;
  }
  
  .team-avatar {
    width: 150px;
    height: 150px;
  }
  
  .navbar-nav {
    padding: 1rem 0;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }
  
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.8s ease-in-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

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

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

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

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

/* Utility Classes */
.bg-primary-gradient {
  background: var(--gradient-storm) !important;
}

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

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

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

/* 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,
a:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}