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

/* === ROOT VARIABLES === */
:root {
  --primary-color: #D2691E;
  --secondary-color: #2F4F4F;
  --primary-dark: #B8571A;
  --primary-light: #E68B3D;
  --secondary-dark: #1F3333;
  --secondary-light: #476B6B;
  --accent-gold: #FFD700;
  --accent-steel: #708090;
  --text-dark: #1a1a1a;
  --text-light: #f8f9fa;
  --text-gray: #6c757d;
  --bg-light: #ffffff;
  --bg-dark: #0a0a0a;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BOOTSTRAP 5 OVERRIDES === */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

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

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: var(--text-light);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

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

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

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

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

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

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

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

/* === GLOBAL STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

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

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

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

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

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

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

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

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

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

.navbar-toggler-icon {
  background-image: none;
  width: 24px;
  height: 2px;
  background-color: var(--primary-color);
  position: relative;
  transition: var(--transition);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

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

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

.navbar-toggler.collapsed .navbar-toggler-icon {
  background-color: transparent;
}

.navbar-toggler.collapsed .navbar-toggler-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.navbar-toggler.collapsed .navbar-toggler-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, 
    rgba(210, 105, 30, 0.1) 0%, 
    rgba(47, 79, 79, 0.1) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="%23D2691E" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(210, 105, 30, 0.05) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

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

.hero-title {
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* === 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: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* === CARDS === */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  background: var(--bg-light);
}

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

.card-img-top {
  transition: var(--transition);
}

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

.card-body {
  padding: 2rem;
}

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

.card-text {
  color: var(--text-gray);
}

/* === PORTFOLIO GRID === */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
  margin-bottom: 2rem;
}

.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(210, 105, 30, 0.8), 
    rgba(47, 79, 79, 0.8));
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

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

.portfolio-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-light);
  text-align: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 3;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(-10px);
}

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

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

/* === FORMS === */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(210, 105, 30, 0.25);
}

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

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-success {
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* === FOOTER === */
footer {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  color: var(--text-light);
  padding: 3rem 0 1rem;
}

footer h5 {
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

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

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

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

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

.animate-fade-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-left {
  animation: fadeInLeft 0.8s ease-out;
}

.animate-fade-right {
  animation: fadeInRight 0.8s ease-out;
}

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

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

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

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

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

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

/* === RESPONSIVE DESIGN === */

/* Mobile First - Base styles above are for mobile */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .container-sm, .container-md, .container-lg, .container-xl {
    max-width: 540px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container-md, .container-lg, .container-xl {
    max-width: 720px;
  }
  
  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
  }
  
  .navbar-nav .nav-link:hover::after,
  .navbar-nav .nav-link.active::after {
    width: 80%;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container-lg, .container-xl {
    max-width: 960px;
  }
  
  section {
    padding: 6rem 0;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container-xl {
    max-width: 1140px;
  }
}

/* === 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: var(--text-light);
  animation: spin 1s ease-in-out infinite;
}

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

/* === SCROLL INDICATOR === */
.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.1s ease-out;
  z-index: 1000;
}

/* === BACK TO TOP BUTTON === */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1000;
}

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

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}