/* Flame & Steel Architecture Studio - CSS */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --primary-color: #FF6B35;
  --secondary-color: #2C3E50;
  --primary-light: #FF8A5C;
  --primary-dark: #E55A2E;
  --secondary-light: #34495E;
  --secondary-dark: #1B2631;
  --accent-orange: #FF7043;
  --accent-steel: #546E7A;
  --text-dark: #212529;
  --text-light: #6C757D;
  --bg-light: #F8F9FA;
  --bg-dark: #212529;
  --white: #FFFFFF;
  --black: #000000;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
  --gradient-flame: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-orange) 100%);
  --gradient-steel: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --transition-fast: 0.3s ease;
  --transition-slow: 0.6s ease;
  --border-radius: 8px;
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

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

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

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

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

p {
  margin-bottom: 1rem;
  color: var(--text-light);
}

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

/* ===== BOOTSTRAP 5 OVERRIDES ===== */
.container {
  max-width: 1200px;
}

.btn {
  border-radius: var(--border-radius);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 30px;
  border: none;
  transition: var(--transition-fast);
  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: var(--transition-slow);
}

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

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

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

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

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

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

/* ===== NAVIGATION ===== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-light);
  transition: var(--transition-fast);
  padding: 1rem 0;
}

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

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

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

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

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

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

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

.navbar-toggler {
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
}

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

/* ===== HERO SECTION ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(44, 62, 80, 0.8) 0%, rgba(255, 107, 53, 0.8) 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23FF6B35" points="0,0 1000,300 1000,1000 0,700"/><polygon fill="%232C3E50" points="0,700 1000,1000 0,1000"/></svg>');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 107, 53, 0.1) 50%, transparent 70%);
  animation: flameShimmer 4s ease-in-out infinite;
}

@keyframes flameShimmer {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

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

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

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero .btn {
  animation: fadeInUp 1s ease-out 0.6s both;
}

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

/* ===== SECTIONS ===== */
.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%;
  width: 60px;
  height: 3px;
  background: var(--gradient-flame);
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-bg {
  background: var(--bg-light);
}

/* ===== CARDS ===== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  transition: var(--transition-fast);
  overflow: hidden;
  height: 100%;
}

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

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

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

.card-body {
  padding: 2rem;
}

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

/* ===== PORTFOLIO GRID ===== */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  margin-bottom: 2rem;
  transition: var(--transition-fast);
}

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

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.9) 0%, rgba(44, 62, 80, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

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

.portfolio-content {
  text-align: center;
  color: var(--white);
  transform: translateY(20px);
  transition: var(--transition-fast);
}

.portfolio-item:hover .portfolio-content {
  transform: translateY(0);
}

/* ===== FORMS ===== */
.form-control {
  border: 2px solid #E9ECEF;
  border-radius: var(--border-radius);
  padding: 12px 15px;
  transition: var(--transition-fast);
  background: var(--white);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
  background: var(--white);
}

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

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

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

/* ===== FOOTER ===== */
.footer {
  background: var(--gradient-steel);
  color: var(--white);
  padding: 3rem 0 1rem;
}

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

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-slow);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: var(--transition-slow);
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: var(--transition-slow);
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ===== LOADING ANIMATION ===== */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s linear infinite;
}

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

/* ===== MOBILE MENU ===== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  padding: 2rem;
}

.mobile-menu.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.mobile-menu .nav-link {
  color: var(--white);
  font-size: 1.5rem;
  margin: 1rem 0;
  text-align: center;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    padding: 2rem 0;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .portfolio-item img {
    height: 200px;
  }
}

@media (max-width: 576px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .card-body {
    padding: 1rem;
  }
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
  color: var(--primary-color);
}

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

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

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

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

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

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
  
  html {
    scroll-behavior: auto;
  }
}

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