/* Molten Steel Architecture Studio CSS */

/* ========== CUSTOM PROPERTIES ========== */
:root {
  --primary-color: #D2001C;
  --secondary-color: #2C2C2C;
  --accent-color: #FF4444;
  --dark-gray: #1A1A1A;
  --light-gray: #F5F5F5;
  --white: #FFFFFF;
  --black: #000000;
  --gradient-molten: linear-gradient(135deg, var(--primary-color) 0%, #FF6B47 50%, #FFB347 100%);
  --gradient-steel: linear-gradient(135deg, var(--secondary-color) 0%, #4A4A4A 50%, #6A6A6A 100%);
  --shadow-light: 0 2px 10px rgba(210, 0, 28, 0.1);
  --shadow-medium: 0 4px 20px rgba(210, 0, 28, 0.2);
  --shadow-heavy: 0 8px 40px rgba(210, 0, 28, 0.3);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

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

html {
  scroll-behavior: smooth;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

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

p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
}

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

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

/* ========== BOOTSTRAP 5 OVERRIDES ========== */
.btn {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 30px;
  border-radius: 0;
  border: none;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

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

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

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

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

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

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

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

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

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

/* Form Overrides */
.form-control {
  border: 2px solid #E0E0E0;
  border-radius: 0;
  padding: 12px 16px;
  font-size: 1rem;
  transition: var(--transition-smooth);
}

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

.form-label {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

/* ========== NAVIGATION ========== */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(210, 0, 28, 0.1);
  transition: var(--transition-smooth);
  padding: 1rem 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-light);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--secondary-color) !important;
  letter-spacing: -0.5px;
  transition: var(--transition-smooth);
}

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

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--secondary-color) !important;
  margin: 0 10px;
  padding: 8px 16px !important;
  position: relative;
  transition: var(--transition-smooth);
}

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

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

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

/* Mobile Menu Toggle */
.navbar-toggler {
  border: none;
  padding: 4px 8px;
}

.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%2844, 44, 44, 1%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: linear-gradient(135deg, rgba(210, 0, 28, 0.9), rgba(44, 44, 44, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="molten" width="20" height="20" patternUnits="userSpaceOnUse"><rect width="20" height="20" fill="%23D2001C" opacity="0.1"/><circle cx="10" cy="10" r="3" fill="%23FF4444" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23molten)"/></svg>');
  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 1000 1000"><circle cx="200" cy="200" r="100" fill="%23D2001C" opacity="0.1"/><circle cx="800" cy="300" r="150" fill="%23FF4444" opacity="0.05"/><circle cx="300" cy="700" r="80" fill="%23D2001C" opacity="0.08"/></svg>');
  animation: float 20s infinite linear;
}

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

.hero h1 {
  color: var(--white);
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.3rem;
  margin-bottom: 3rem;
}

/* ========== ANIMATIONS ========== */
@keyframes float {
  0% { transform: translateX(-100px); }
  100% { transform: translateX(100px); }
}

@keyframes moltenFlow {
  0%, 100% { transform: translateX(-50px) rotate(0deg); }
  25% { transform: translateX(50px) rotate(90deg); }
  50% { transform: translateX(-30px) rotate(180deg); }
  75% { transform: translateX(30px) rotate(270deg); }
}

@keyframes steelShine {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}

.animate-molten {
  animation: moltenFlow 15s infinite ease-in-out;
}

.animate-shine {
  position: relative;
  overflow: hidden;
}

.animate-shine::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: steelShine 3s infinite;
}

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

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

/* ========== SECTIONS ========== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-dark {
  background: var(--gradient-steel);
  color: var(--white);
}

.section-dark h2,
.section-dark h3,
.section-dark p {
  color: var(--white);
}

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

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

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-molten);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 1;
}

.project-card:hover::before {
  opacity: 0.8;
}

.project-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--white);
  transform: translateY(50%);
  transition: var(--transition-smooth);
  z-index: 2;
}

.project-card:hover .project-card-content {
  transform: translateY(0);
}

/* Service Cards */
.service-card {
  background: var(--white);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 4px;
  background: var(--gradient-molten);
  transition: var(--transition-smooth);
}

.service-card:hover::before {
  left: 0;
}

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

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

/* ========== FORMS ========== */
.contact-form {
  background: var(--white);
  padding: 3rem;
  box-shadow: var(--shadow-medium);
  position: relative;
}

.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-molten);
}

.form-floating .form-control {
  border-radius: 0;
}

.form-floating .form-control:focus {
  border-color: var(--primary-color);
}

.form-floating label {
  color: var(--secondary-color);
}

/* Form Validation Styles */
.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.5rem;
}

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

/* ========== FOOTER ========== */
.footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 4rem 0 2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-molten);
}

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

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  margin-right: 10px;
  transition: var(--transition-smooth);
}

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

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

/* Mobile First - Extra Small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }
  
  .hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .project-card {
    height: 250px;
    margin-bottom: 1rem;
  }
  
  .service-card {
    padding: 2rem 1rem;
    margin-bottom: 1rem;
  }
  
  .contact-form {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
  }
  
  .navbar-collapse {
    background: rgba(255, 255, 255, 0.98);
    margin-top: 1rem;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: var(--shadow-light);
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero h1 {
    font-size: 3rem;
  }
  
  .project-card {
    height: 300px;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {
    min-height: 90vh;
  }
  
  .project-card {
    height: 350px;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .hero {
    min-height: 100vh;
  }
  
  .navbar-nav .nav-link {
    margin: 0 15px;
  }
}

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

/* ========== UTILITY CLASSES ========== */
.text-gradient {
  background: var(--gradient-molten);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

.shadow-molten {
  box-shadow: var(--shadow-medium) !important;
}

.transition-smooth {
  transition: var(--transition-smooth) !important;
}

/* Loading Animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(210, 0, 28, 0.1), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(210, 0, 28, 0.1);
  z-index: 9999;
}

.scroll-progress-bar {
  height: 100%;
  background: var(--gradient-molten);
  width: 0%;
  transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--gradient-molten);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition-smooth);
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}