/* Ember Slate Architecture Studio Theme */
/* Primary Color: #D2691E (Chocolate/Ember) */
/* Secondary Color: #2F4F4F (Dark Slate Gray) */

/* ========================================
   CSS VARIABLES & ROOT SETTINGS
======================================== */
:root {
  --primary-color: #D2691E;
  --primary-dark: #B85A18;
  --primary-light: #E07B2F;
  --secondary-color: #2F4F4F;
  --secondary-dark: #1F3535;
  --secondary-light: #3F6464;
  --accent-color: #E8B896;
  --text-dark: #1A1A1A;
  --text-light: #F5F5F5;
  --text-muted: #6C757D;
  --bg-light: #FAFAFA;
  --bg-dark: #2F4F4F;
  --border-color: #E0E0E0;
  --shadow-sm: 0 2px 8px rgba(47, 79, 79, 0.1);
  --shadow-md: 0 4px 16px rgba(47, 79, 79, 0.15);
  --shadow-lg: 0 8px 32px rgba(47, 79, 79, 0.2);
  --transition-speed: 0.3s;
  --border-radius: 2px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
}

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

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

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

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
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-dark);
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Buttons */
.btn {
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.875rem;
  transition: all var(--transition-speed) ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:focus,
.btn-primary:active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #FFFFFF;
  box-shadow: 0 0 0 0.25rem rgba(210, 105, 30, 0.25);
}

.btn-secondary {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  border-color: var(--secondary-light);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--secondary-light);
  border-color: var(--secondary-light);
  color: #FFFFFF;
  box-shadow: 0 0 0 0.25rem rgba(47, 79, 79, 0.25);
}

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

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #FFFFFF;
}

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

.btn-outline-secondary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #FFFFFF;
}

/* Forms */
.form-control {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
  font-size: 1rem;
  color: var(--text-dark);
}

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

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

.form-select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
}

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

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

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

.card-title {
  color: var(--secondary-color);
}

/* Navbar */
.navbar {
  padding: 1rem 0;
  transition: all var(--transition-speed) ease;
}

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

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

/* ========================================
   HEADER & NAVIGATION
======================================== */
.site-header {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar-nav .nav-link {
  color: var(--secondary-color);
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  position: relative;
  transition: color var(--transition-speed) ease;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: all var(--transition-speed) ease;
  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: 80%;
}

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

.navbar-toggler {
  border: 2px solid var(--secondary-color);
  padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(47, 79, 79, 0.15);
}

.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='%232F4F4F' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

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

.hero-section::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 1200 600"><rect fill="%232F4F4F" width="1200" height="600"/><g fill-opacity="0.05"><rect fill="%23ffffff" x="0" y="0" width="400" height="600"/><rect fill="%23ffffff" x="800" y="0" width="400" height="600"/></g></svg>');
  background-size: cover;
  opacity: 0.3;
}

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

.hero-section h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease forwards;
}

.hero-section p {
  color: var(--accent-color);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s forwards;
  opacity: 0;
}

.hero-section .btn {
  animation: fadeInUp 1s ease 0.4s forwards;
  opacity: 0;
}

.hero-image {
  position: relative;
  animation: fadeInRight 1s ease 0.3s forwards;
  opacity: 0;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100%;
  height: 100%;
  border: 3px solid var(--primary-color);
  z-index: -1;
}

/* ========================================
   SECTIONS
======================================== */
section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title h2 {
  margin-bottom: 1rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 1.5rem auto 0;
}

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

/* About Section */
.about-section {
  background-color: #FFFFFF;
}

.about-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.about-image-wrapper img {
  transition: transform 0.6s ease;
}

.about-image-wrapper:hover img {
  transform: scale(1.05);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
}

.stat-item:hover {
  background-color: var(--primary-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.stat-item:hover .stat-number,
.stat-item:hover .stat-label {
  color: #FFFFFF;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: var(--font-heading);
  transition: color var(--transition-speed) ease;
}

.stat-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: color var(--transition-speed) ease;
}

/* Projects/Portfolio Section */
.projects-section {
  background-color: var(--bg-light);
}

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

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

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

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

.project-title {
  color: #FFFFFF;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.1s;
}

.project-category {
  color: var(--accent-color);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transform: translateY(20px);
  transition: transform 0.4s ease 0.2s;
}

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

/* Filter Buttons */
.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.625rem 1.5rem;
  background-color: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  transition: all var(--transition-speed) ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #FFFFFF;
}

/* Services Section */
.services-section {
  background-color: #FFFFFF;
}

.service-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background-color: var(--bg-light);
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
  height: 100%;
  border: 2px solid transparent;
}

.service-card:hover {
  background-color: #FFFFFF;
  border-color: var(--primary-color);
  transform: translateY(-10px);
  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(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  font-size: 2rem;
  color: #FFFFFF;
  transition: all var(--transition-speed) ease;
}

.service-card:hover .service-icon {
  transform: rotateY(360deg);
}

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

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

/* Team Section */
.team-section {
  background-color: var(--bg-light);
}

.team-member {
  text-align: center;
  transition: all var(--transition-speed) ease;
}

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

.team-image {
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
  filter: grayscale(100%);
}

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

.team-social {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(47, 79, 79, 0.95);
  transition: bottom var(--transition-speed) ease;
}

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

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  color: #FFFFFF;
  transition: all var(--transition-speed) ease;
}

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

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

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

/* Testimonials Section */
.testimonials-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
  color: var(--text-light);
}

.testimonials-section .section-title h2,
.testimonials-section .section-subtitle {
  color: var(--text-light);
}

.testimonial-card {
  background-color: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  padding: 2.5rem;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-speed) ease;
}

.testimonial-card:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

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

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

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

.author-name {
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

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

/* Contact Section */
.contact-section {
  background-color: #FFFFFF;
}

.contact-info {
  background-color: var(--secondary-color);
  padding: 3rem;
  border-radius: var(--border-radius);
  color: var(--text-light);
  height: 100%;
}

.contact-info h3 {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

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

.contact-details h4 {
  color: var(--accent-color);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.contact-details p,
.contact-details a {
  color: var(--text-light);
  margin-bottom: 0;
}

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

.contact-form {
  background-color: var(--bg-light);
  padding: 3rem;
  border-radius: var(--border-radius);
}

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

.form-error.show {
  display: block;
}

.form-control.error {
  border-color: #dc3545;
}

.form-success {
  display: none;
  padding: 1rem;
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.form-success.show {
  display: block;
}

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

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h4 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: var(--accent-color);
  line-height: 1.8;
}

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

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

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

.footer-links a {
  display: inline-block;
  transition: all var(--transition-speed) ease;
}

.footer-links a:hover {
  transform: translateX(5px);
}

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

.footer-social a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all var(--transition-speed) ease;
}

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

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

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

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

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

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

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

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

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

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-speed) ease;
  z-index: 999;
  box-shadow: var(--shadow-md);
}

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

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

/* ========================================
   RESPONSIVE DESIGN - MOBILE FIRST
======================================== */

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

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  section {
    padding: 6rem 0;
  }
  
  .hero-section {
    min-height: 100vh;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  .navbar-expand-lg .navbar-nav .nav-link {
    padding: 0.5rem 1.25rem;
  }
}

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

/* XX-Large devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Mobile Specific Styles */
@media (max-width: 767px) {
  .hero-section {
    min-height: 70vh;
    text-align: center;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section p {
    font-size: 1rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .project-card {
    height: 300px;
  }
  
  .contact-form,
  .contact-info {
    padding: 2rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Tablet Adjustments */
@media (min-width: 768px) and (max-width: 991px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .project-card {
    height: 350px;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .back-to-top,
  .navbar-toggler {
    display: none;
  }
  
  body {
    color: #000;
  }
  
  a {
    text-decoration: underline;
  }
}