/* Ember Steel Architecture Studio - Custom Styles */

/* ===========================
   CSS Variables & Base Setup
   =========================== */
:root {
  --primary-color: #C8102E;
  --primary-dark: #9A0C24;
  --primary-light: #E6475E;
  --secondary-color: #F4F4F4;
  --accent-color: #2C2C2C;
  --text-dark: #1A1A1A;
  --text-light: #666666;
  --white: #FFFFFF;
  --black: #000000;
  --steel-gray: #8B9196;
  --ember-glow: rgba(200, 16, 46, 0.1);
  --transition-base: all 0.3s ease;
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --border-radius: 4px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

/* ===========================
   Global Resets & Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

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

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

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

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

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-base);
}

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

/* ===========================
   Bootstrap 5 Overrides
   =========================== */
.container {
  max-width: 1320px;
}

/* Buttons */
.btn {
  font-family: var(--font-primary);
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: var(--border-radius);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.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-smooth);
  z-index: -1;
}

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

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

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

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

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

.btn-secondary {
  background-color: var(--accent-color);
  color: var(--white);
  border: 2px solid var(--accent-color);
}

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

.btn-light {
  background-color: var(--secondary-color);
  color: var(--accent-color);
  border: 2px solid var(--secondary-color);
}

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

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

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

.card-title {
  color: var(--accent-color);
  font-family: var(--font-heading);
  font-weight: 700;
}

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

/* Forms */
.form-control,
.form-select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--secondary-color);
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  transition: var(--transition-base);
  background-color: var(--white);
  color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem var(--ember-glow);
  outline: none;
  background-color: var(--white);
  color: var(--text-dark);
}

.form-control::placeholder {
  color: var(--steel-gray);
}

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

.invalid-feedback {
  color: var(--primary-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

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

/* Navbar */
.navbar {
  padding: 1.5rem 0;
  transition: var(--transition-base);
  background-color: transparent;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  backdrop-filter: blur(10px);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-color);
  letter-spacing: -0.02em;
}

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

.navbar-nav .nav-link {
  color: var(--accent-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  position: relative;
  transition: var(--transition-base);
}

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

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

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

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  color: var(--accent-color);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid var(--primary-color);
}

/* ===========================
   Custom Components
   =========================== */

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--white) 100%);
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, var(--ember-glow) 0%, transparent 100%);
  clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
}

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

.hero-title {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: var(--text-light);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

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

/* Section Styling */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  position: relative;
  display: inline-block;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 1rem auto 0;
}

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

.project-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition-smooth);
}

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

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

.project-card-title {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

.project-card-category {
  color: var(--secondary-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: var(--transition-smooth) 0.1s;
}

.project-card:hover .project-card-title,
.project-card:hover .project-card-category {
  transform: translateY(0);
}

/* Services */
.service-item {
  text-align: center;
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
  background-color: var(--white);
  transition: var(--transition-smooth);
  border: 2px solid var(--secondary-color);
  height: 100%;
}

.service-item:hover {
  border-color: var(--primary-color);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ember-glow), var(--secondary-color));
  border-radius: 50%;
  font-size: 2rem;
  color: var(--primary-color);
  transition: var(--transition-base);
}

.service-item:hover .service-icon {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--white);
  transform: rotateY(360deg);
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-description {
  color: var(--text-light);
  line-height: 1.7;
}

/* Team Members */
.team-member {
  text-align: center;
  transition: var(--transition-smooth);
}

.team-member-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
}

.team-member-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: var(--transition-smooth);
  filter: grayscale(100%);
}

.team-member:hover .team-member-image {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.team-member-social {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(to top, rgba(200, 16, 46, 0.95), transparent);
  transition: var(--transition-smooth);
}

.team-member:hover .team-member-social {
  bottom: 0;
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: var(--primary-color);
  border-radius: 50%;
  transition: var(--transition-base);
  font-size: 1rem;
}

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

.team-member-name {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.team-member-role {
  color: var(--primary-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Testimonials */
.testimonial-card {
  background-color: var(--secondary-color);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  position: relative;
  height: 100%;
  transition: var(--transition-smooth);
}

.testimonial-card:hover {
  background-color: var(--white);
  box-shadow: var(--shadow-lg);
}

.testimonial-quote {
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-size: 1.125rem;
  font-style: italic;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-author-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
}

.testimonial-author-name {
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 0.25rem;
}

.testimonial-author-title {
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Contact Form */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: var(--secondary-color);
  border-radius: var(--border-radius);
  margin-bottom: 1.5rem;
  transition: var(--transition-smooth);
}

.contact-info-item:hover {
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateX(8px);
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-info-content h5 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
}

.contact-info-content p {
  margin: 0;
  color: var(--text-light);
}

.contact-info-content a {
  color: var(--text-light);
  transition: var(--transition-base);
}

.contact-info-content a:hover {
  color: var(--primary-color);
}

/* Footer */
.footer {
  background-color: var(--accent-color);
  color: var(--secondary-color);
  padding: 4rem 0 2rem;
}

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

.footer p,
.footer a {
  color: var(--steel-gray);
  font-size: 0.9375rem;
}

.footer a:hover {
  color: var(--primary-color);
  padding-left: 5px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  transition: var(--transition-base);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  transition: var(--transition-base);
  font-size: 1.125rem;
}

.footer-social-icon:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-3px);
}

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

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

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

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

/* Stats Counter */
.stats-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stats-number {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-heading);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stats-label {
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
}

/* Image Gallery */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
  aspect-ratio: 1 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

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

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(200, 16, 46, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

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

.gallery-item-icon {
  color: var(--white);
  font-size: 2.5rem;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

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

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

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

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

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

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

/* Scroll Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Utility Classes
   =========================== */
.text-primary {
  color: var(--primary-color);
}

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

.bg-light-gray {
  background-color: var(--secondary-color);
}

.bg-primary-light {
  background-color: var(--ember-glow);
}

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

.shadow-custom {
  box-shadow: var(--shadow-md);
}

/* ===========================
   Responsive Design
   =========================== */

/* Large Devices */
@media (max-width: 1199.98px) {
  .section {
    padding: 5rem 0;
  }
}

/* Medium Devices */
@media (max-width: 991.98px) {
  .section {
    padding: 4rem 0;
  }
  
  .navbar-collapse {
    background-color: var(--white);
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
  
  .project-card {
    height: 350px;
  }
  
  .team-member-image {
    height: 300px;
  }
}

/* Small Devices */
@media (max-width: 767.98px) {
  .section {
    padding: 3rem 0;
  }
  
  .section-header {
    margin-bottom: 3rem;
  }
  
  .hero-section {
    min-height: 80vh;
  }
  
  .hero-section::before {
    width: 100%;
    clip-path: none;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8125rem;
  }
  
  .project-card {
    height: 300px;
    margin-bottom: 1.5rem;
  }
  
  .service-item {
    margin-bottom: 1.5rem;
  }
  
  .testimonial-card {
    padding: 2rem;
    margin-bottom: 1.5rem;
  }
  
  .stats-item {
    padding: 1.5rem 0.5rem;
  }
  
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
  
  .contact-info-item {
    margin-bottom: 1rem;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* Extra Small Devices */
@media (max-width: 575.98px) {
  html {
    font-size: 15px;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .testimonial-text {
    font-size: 1rem;
  }
  
  .service-icon {
    width: 70px;
    height: 70px;
    font-size: 1.75rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .scroll-to-top,
  .btn,
  .footer-social {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: var(--black);
  }
  
  .section {
    page-break-inside: avoid;
  }
}