/* ====================================
   ARCHITECTURE STUDIO - DARK CHARCOAL & GOLD THEME
   Modern, Responsive CSS
   ==================================== */

/* ====================================
   ROOT VARIABLES & TYPOGRAPHY
   ==================================== */
:root {
  --primary-color: #1a1a1a;
  --secondary-color: #c9a96e;
  --accent-gold: #d4af37;
  --dark-bg: #0f0f0f;
  --light-text: #f5f5f5;
  --mid-gray: #404040;
  --light-gray: #e0e0e0;
  --hover-gold: #e0c080;
  --transition-speed: 0.4s;
  --box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  --border-gold: 2px solid var(--secondary-color);
}

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

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--primary-color);
  color: var(--light-text);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* ====================================
   TYPOGRAPHY
   ==================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--light-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -1px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.5px;
}

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

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

p {
  margin-bottom: 1rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--light-gray);
}

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

a:hover {
  color: var(--hover-gold);
}

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

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

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--hover-gold);
  border-color: var(--hover-gold);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(201, 169, 110, 0.4);
}

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

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

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

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

.form-control,
.form-select {
  background-color: var(--mid-gray);
  border: 1px solid var(--mid-gray);
  color: var(--light-text);
  padding: 0.875rem 1.25rem;
  border-radius: 0;
  transition: all var(--transition-speed) ease;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--mid-gray);
  border-color: var(--secondary-color);
  color: var(--light-text);
  box-shadow: 0 0 0 0.2rem rgba(201, 169, 110, 0.25);
}

.form-control::placeholder {
  color: #999;
}

.form-label {
  color: var(--light-gray);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.card {
  background-color: var(--mid-gray);
  border: none;
  border-radius: 0;
  color: var(--light-text);
  transition: all var(--transition-speed) ease;
}

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

.modal-content {
  background-color: var(--primary-color);
  border: var(--border-gold);
  border-radius: 0;
}

.modal-header {
  border-bottom-color: var(--mid-gray);
}

.modal-footer {
  border-top-color: var(--mid-gray);
}

.nav-link {
  color: var(--light-gray);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.5rem 1rem;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: var(--secondary-color);
}

/* ====================================
   HEADER & NAVIGATION
   ==================================== */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-speed) ease;
  background-color: transparent;
  padding: 1.5rem 0;
}

.main-header.scrolled {
  background-color: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  padding: 1rem 0;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--light-text);
  letter-spacing: 2px;
  position: relative;
}

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

.navbar-brand::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width var(--transition-speed) ease;
}

.navbar-brand:hover::after {
  width: 100%;
}

.navbar-toggler {
  border: none;
  padding: 0.5rem;
  background-color: transparent;
}

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

.navbar-toggler-icon {
  background-image: none;
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color);
  display: block;
  position: relative;
  transition: all var(--transition-speed) ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: '';
  width: 30px;
  height: 2px;
  background-color: var(--secondary-color);
  position: absolute;
  left: 0;
  transition: all var(--transition-speed) ease;
}

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

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

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

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

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

.navbar-nav .nav-link {
  position: relative;
  margin: 0 0.5rem;
}

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

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

/* ====================================
   HERO SECTION
   ==================================== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-color) 100%);
  overflow: hidden;
  padding-top: 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(30deg, var(--secondary-color) 12%, transparent 12.5%, transparent 87%, var(--secondary-color) 87.5%, var(--secondary-color)),
    linear-gradient(150deg, var(--secondary-color) 12%, transparent 12.5%, transparent 87%, var(--secondary-color) 87.5%, var(--secondary-color)),
    linear-gradient(30deg, var(--secondary-color) 12%, transparent 12.5%, transparent 87%, var(--secondary-color) 87.5%, var(--secondary-color)),
    linear-gradient(150deg, var(--secondary-color) 12%, transparent 12.5%, transparent 87%, var(--secondary-color) 87.5%, var(--secondary-color));
  background-size: 80px 140px;
  background-position: 0 0, 0 0, 40px 70px, 40px 70px;
  opacity: 0.03;
  animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
  0% {
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
  }
  100% {
    background-position: 80px 140px, 80px 140px, 120px 210px, 120px 210px;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 2rem;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-content .gold-line {
  width: 100px;
  height: 3px;
  background-color: var(--secondary-color);
  margin: 0 auto 2rem;
  animation: expandWidth 1s ease-out 0.3s backwards;
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100px;
  }
}

.hero-content p {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  margin-bottom: 2.5rem;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s backwards;
}

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

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-indicator a {
  color: var(--secondary-color);
  font-size: 2rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ====================================
   SECTION STYLES
   ==================================== */
.section {
  padding: 6rem 0;
  position: relative;
}

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

.section-primary {
  background-color: var(--primary-color);
}

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

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

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

.section-title.left-align {
  text-align: left;
}

.section-title.left-align::after {
  margin: 0;
}

/* ====================================
   PROJECT GRID
   ==================================== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  background-color: var(--mid-gray);
}

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

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

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.95) 0%, 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-overlay h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: transform var(--transition-speed) ease;
}

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

.project-overlay p {
  transform: translateY(20px);
  transition: transform var(--transition-speed) ease 0.1s;
}

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

/* ====================================
   SERVICES SECTION
   ==================================== */
.service-item {
  text-align: center;
  padding: 3rem 2rem;
  background-color: var(--mid-gray);
  transition: all var(--transition-speed) ease;
  border: 2px solid transparent;
  height: 100%;
}

.service-item:hover {
  border-color: var(--secondary-color);
  transform: translateY(-10px);
  box-shadow: var(--box-shadow);
}

.service-icon {
  font-size: 3.5rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  transition: transform var(--transition-speed) ease;
}

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

.service-item h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.service-item p {
  font-size: 1rem;
  margin-bottom: 0;
}

/* ====================================
   STATS SECTION
   ==================================== */
.stats-section {
  background: linear-gradient(rgba(26, 26, 26, 0.9), rgba(26, 26, 26, 0.9)), 
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23c9a96e" opacity="0.1" width="100" height="100"/></svg>');
  background-attachment: fixed;
  background-size: cover;
}

.stat-item {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--secondary-color);
  font-family: 'Playfair Display', serif;
  display: block;
  margin-bottom: 0.5rem;
}

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

/* ====================================
   TEAM SECTION
   ==================================== */
.team-member {
  text-align: center;
  margin-bottom: 2rem;
}

.team-member-image {
  width: 250px;
  height: 250px;
  margin: 0 auto 1.5rem;
  position: relative;
  overflow: hidden;
}

.team-member-image::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: -10px;
  bottom: -10px;
  border: 2px solid var(--secondary-color);
  z-index: 1;
  transition: all var(--transition-speed) ease;
}

.team-member:hover .team-member-image::before {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.team-member-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter var(--transition-speed) ease;
}

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

.team-member h4 {
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}

.team-member .position {
  color: var(--secondary-color);
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.team-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--secondary-color);
  color: var(--secondary-color);
  transition: all var(--transition-speed) ease;
}

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

/* ====================================
   TESTIMONIALS
   ==================================== */
.testimonial-card {
  background-color: var(--mid-gray);
  padding: 3rem 2rem;
  text-align: center;
  border-left: 4px solid var(--secondary-color);
  position: relative;
  margin: 1rem;
}

.testimonial-card::before {
  content: '\201C';
  font-size: 6rem;
  color: var(--secondary-color);
  opacity: 0.2;
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: Georgia, serif;
}

.testimonial-text {
  font-size: 1.125rem;
  font-style: italic;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.25rem;
}

.testimonial-role {
  font-size: 0.875rem;
  color: var(--light-gray);
}

/* ====================================
   CONTACT FORM
   ==================================== */
.contact-form {
  background-color: var(--mid-gray);
  padding: 3rem;
  border: 2px solid var(--secondary-color);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-info {
  padding: 3rem 2rem;
}

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

.contact-info-icon {
  font-size: 2rem;
  color: var(--secondary-color);
  min-width: 40px;
}

.contact-info-content h4 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.contact-info-content p {
  margin-bottom: 0;
}

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

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

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

.success-message {
  background-color: rgba(201, 169, 110, 0.2);
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  display: none;
}

.success-message.show {
  display: block;
  animation: slideDown 0.5s ease-out;
}

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

/* ====================================
   FOOTER
   ==================================== */
.main-footer {
  background-color: var(--dark-bg);
  padding: 4rem 0 2rem;
  border-top: 3px solid var(--secondary-color);
}

.footer-content {
  margin-bottom: 3rem;
}

.footer-section {
  margin-bottom: 2rem;
}

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

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

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

.footer-section ul li a {
  color: var(--light-gray);
  transition: all var(--transition-speed) ease;
  display: inline-block;
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

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

.footer-social a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  font-size: 1.25rem;
  transition: all var(--transition-speed) ease;
}

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

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--mid-gray);
  text-align: center;
  color: var(--light-gray);
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 0.875rem;
}

/* ====================================
   BACK TO TOP BUTTON
   ==================================== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

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

/* ====================================
   LOADING ANIMATION
   ==================================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 60px;
  height: 60px;
  border: 4px solid var(--mid-gray);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

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

.bg-dark-custom {
  background-color: var(--dark-bg);
}

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

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

/* ====================================
   ANIMATIONS
   ==================================== */
.fade-in {
  animation: fadeIn 1s ease-out;
}

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

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

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

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

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

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 991px) {
  .navbar-collapse {
    background-color: rgba(26, 26, 26, 0.98);
    padding: 2rem;
    margin-top: 1rem;
    border: 2px solid var(--secondary-color);
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .section {
    padding: 4rem 0;
  }
}

@media (max-width: 767px) {
  .team-member-image {
    width: 200px;
    height: 200px;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  .service-item {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 575px) {
  .contact-form {
    padding: 1.5rem 1rem;
  }
  
  .contact-info {
    padding: 2rem 1rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .project-overlay {
    padding: 1.5rem;
  }
}

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

:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 3px;
}

/* ====================================
   PRINT STYLES
   ==================================== */
@media print {
  .main-header,
  .back-to-top,
  .scroll-indicator {
    display: none;
  }
  
  body {
    background-color: white;
    color: black;
  }
}