/* Mystic Stone Architecture Studio - Custom CSS */

:root {
  --primary-color: #2C3E50;
  --secondary-color: #8B4513;
  --light-stone: #D4C5B9;
  --dark-stone: #1a252f;
  --fog-white: rgba(255, 255, 255, 0.95);
  --mystic-shadow: rgba(44, 62, 80, 0.3);
  --transition-speed: 0.4s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--primary-color);
  overflow-x: hidden;
  background-color: #f8f9fa;
}

/* Typography */
.display-1, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700 !important;
  letter-spacing: -1px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.8;
}

/* Navigation */
.navbar {
  background-color: var(--primary-color) !important;
  padding: 1rem 0;
  box-shadow: 0 2px 15px var(--mystic-shadow);
  transition: all var(--transition-speed) ease;
}

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

.navbar.scrolled {
  padding: 0.5rem 0;
  background-color: var(--dark-stone) !important;
}

.navbar-brand {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all var(--transition-speed) ease;
}

.navbar-brand:hover {
  color: var(--light-stone) !important;
  transform: translateY(-2px);
}

.navbar-toggler {
  border: 2px solid #ffffff !important;
  padding: 0.5rem 0.75rem !important;
}

.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%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-nav .nav-link {
  color: #ffffff !important;
  font-weight: 500 !important;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: all var(--transition-speed) ease;
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

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

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

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

/* Hero Section */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-stone) 100%);
  position: relative;
  overflow: hidden;
}

.hero-image {
  object-fit: cover;
  opacity: 0.3;
  filter: grayscale(20%);
  z-index: 1;
}

.fog-overlay {
  background: linear-gradient(180deg, 
    rgba(44, 62, 80, 0.4) 0%, 
    rgba(44, 62, 80, 0.7) 50%, 
    rgba(44, 62, 80, 0.9) 100%);
  z-index: 2;
  animation: fogAnimation 8s ease-in-out infinite;
}

@keyframes fogAnimation {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.6; }
}

.hero-content {
  z-index: 3;
  text-align: center;
  padding: 2rem;
}

.hero-content .display-1 {
  color: #ffffff !important;
  font-size: clamp(2.5rem, 8vw, 5rem) !important;
  animation: fadeInUp 1s ease-out;
  margin-bottom: 1.5rem !important;
}

.hero-content .lead {
  color: var(--light-stone) !important;
  max-width: 700px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1.2s ease-out;
}

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

/* Buttons */
.btn {
  border-radius: 0 !important;
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-speed) ease !important;
  position: relative;
  overflow: hidden;
  border-width: 2px !important;
}

.btn-lg {
  padding: 1rem 2.5rem !important;
  font-size: 1rem !important;
}

.btn-primary {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #6d3610 !important;
  border-color: #6d3610 !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(139, 69, 19, 0.4) !important;
}

.btn-outline-light {
  border-color: #ffffff !important;
  color: #ffffff !important;
  background-color: transparent !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(255, 255, 255, 0.3) !important;
}

.btn-light {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  color: var(--primary-color) !important;
}

.btn-light:hover {
  background-color: var(--light-stone) !important;
  border-color: var(--light-stone) !important;
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.5rem !important;
  font-size: 0.875rem !important;
}

/* Service Cards */
.service-card {
  background: #ffffff;
  border-radius: 8px;
  transition: all var(--transition-speed) ease;
  border: 2px solid transparent;
  height: 100%;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px var(--mystic-shadow) !important;
  border-color: var(--secondary-color);
}

.service-card .bi {
  font-size: 3rem;
  color: var(--secondary-color);
  transition: all var(--transition-speed) ease;
}

.service-card:hover .bi {
  transform: scale(1.1) rotate(5deg);
  color: var(--primary-color);
}

.service-card h4,
.service-card .h4 {
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: #666 !important;
  line-height: 1.7;
}

/* Card Component */
.card {
  border: none !important;
  border-radius: 8px !important;
  overflow: hidden;
  transition: all var(--transition-speed) ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--mystic-shadow) !important;
}

.card-body {
  padding: 2rem !important;
}

/* Parallax Section */
.parallax-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  min-height: 400px;
}

.parallax-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 62, 80, 0.85);
  z-index: 1;
}

.parallax-section .container {
  position: relative;
  z-index: 2;
}

.parallax-section * {
  color: #ffffff !important;
}

/* Portfolio */
.portfolio-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  height: 350px;
  background-color: var(--primary-color);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s ease;
}

.portfolio-item:hover img {
  transform: scale(1.15);
  opacity: 0.3;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--primary-color) 0%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: all 0.6s ease;
}

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

.portfolio-overlay h4,
.portfolio-overlay .h4 {
  color: #ffffff !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: all 0.6s ease 0.1s;
}

.portfolio-item:hover .portfolio-overlay h4,
.portfolio-item:hover .portfolio-overlay .h4 {
  transform: translateY(0);
}

.portfolio-overlay p {
  color: var(--light-stone) !important;
  transform: translateY(20px);
  transition: all 0.6s ease 0.2s;
}

.portfolio-item:hover .portfolio-overlay p {
  transform: translateY(0);
}

/* Badge */
.badge {
  padding: 0.5rem 1rem !important;
  font-weight: 600 !important;
  border-radius: 20px !important;
  background-color: var(--secondary-color) !important;
  color: #ffffff !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Accordion */
.accordion-item {
  border: none !important;
  margin-bottom: 1rem;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.accordion-header {
  border: none !important;
}

.accordion-button {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  padding: 1.25rem 1.5rem !important;
  border: none !important;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  background-color: var(--secondary-color) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.accordion-button:focus {
  box-shadow: none !important;
  border: none !important;
}

.accordion-button::after {
  filter: brightness(0) invert(1);
}

.accordion-body {
  padding: 1.5rem !important;
  background-color: #ffffff;
  color: var(--primary-color) !important;
  line-height: 1.8;
}

.accordion-collapse {
  border: none !important;
}

/* Forms */
.form-label {
  font-weight: 600 !important;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.form-control,
.form-select {
  border: 2px solid #dee2e6 !important;
  border-radius: 4px !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  transition: all var(--transition-speed) ease !important;
  background-color: #ffffff !important;
  color: var(--primary-color) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(139, 69, 19, 0.25) !important;
  outline: none !important;
}

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

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Sections */
section {
  padding: 5rem 0;
}

.py-5 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

.pt-5 {
  padding-top: 4rem !important;
}

.pb-4 {
  padding-bottom: 3rem !important;
}

/* Text Colors */
.text-white {
  color: #ffffff !important;
}

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

.text-muted {
  color: #6c757d !important;
}

.text-center {
  text-align: center !important;
}

/* Background Colors */
.bg-white {
  background-color: #ffffff !important;
}

.bg-opacity-90 {
  opacity: 0.9 !important;
}

/* Shadows */
.shadow {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
}

.shadow-sm {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
}

/* Rounded */
.rounded {
  border-radius: 8px !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 3rem 0 1rem;
}

footer h5,
footer .h5 {
  color: #ffffff !important;
  font-weight: 700 !important;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

footer p,
footer .small {
  color: var(--light-stone) !important;
  line-height: 1.8;
}

footer a {
  color: var(--light-stone) !important;
  text-decoration: none !important;
  transition: all var(--transition-speed) ease;
}

footer a:hover {
  color: #ffffff !important;
  padding-left: 5px;
}

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

footer .bi {
  color: var(--secondary-color) !important;
  margin-right: 0.5rem;
}

.border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Icons */
.bi {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.bi-geo-alt::before { content: "\F3B5"; }
.bi-telephone::before { content: "\F4E6"; }
.bi-envelope::before { content: "\F32F"; }
.bi-search::before { content: "\F52A"; }
.bi-book::before { content: "\F2E2"; }
.bi-pencil-square::before { content: "\F4C9"; }
.bi-hammer::before { content: "\F3A6"; }
.bi-building::before { content: "\F2DA"; }
.bi-check-circle::before { content: "\F26B"; }
.bi-box::before { content: "\F2DE"; }
.bi-box-arrow-up-right::before { content: "\F2E0"; }

.fs-4 {
  font-size: 1.5rem !important;
}

.fs-5 {
  font-size: 1.25rem !important;
}

/* Utility Classes */
.d-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.d-inline-block {
  display: inline-block !important;
}

.align-items-center {
  align-items: center !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.gap-3 {
  gap: 1rem !important;
}

.gap-4 {
  gap: 1.5rem !important;
}

.gap-5 {
  gap: 3rem !important;
}

.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

.top-0 {
  top: 0 !important;
}

.top-50 {
  top: 50% !important;
}

.bottom-0 {
  bottom: 0 !important;
}

.start-0 {
  left: 0 !important;
}

.start-50 {
  left: 50% !important;
}

.end-0 {
  right: 0 !important;
}

.translate-middle {
  transform: translate(-50%, -50%) !important;
}

.translate-middle-x {
  transform: translateX(-50%) !important;
}

.w-100 {
  width: 100% !important;
}

.w-75 {
  width: 75% !important;
}

.h-100 {
  height: 100% !important;
}

.overflow-hidden {
  overflow: hidden !important;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.fw-bold {
  font-weight: 700 !important;
}

/* Spacing */
.m-3 {
  margin: 1rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.mb-md-0 {
  margin-bottom: 0 !important;
}

.mb-lg-0 {
  margin-bottom: 0 !important;
}

.ms-1 {
  margin-left: 0.25rem !important;
}

.ms-4 {
  margin-left: 1.5rem !important;
}

.ms-auto {
  margin-left: auto !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.p-0 {
  padding: 0 !important;
}

.p-3 {
  padding: 1rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.p-5 {
  padding: 3rem !important;
}

.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.px-0 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.px-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

.pt-3 {
  padding-top: 1rem !important;
}

.pt-4 {
  padding-top: 1.5rem !important;
}

.ps-lg-5 {
  padding-left: 3rem !important;
}

.px-lg-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

.p-md-5 {
  padding: 3rem !important;
}

/* Animations */
@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 fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

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

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: var(--dark-stone);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 8px;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
  
  .hero-content .display-1 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2.5rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .display-5 {
    font-size: 1.75rem !important;
  }
  
  .display-6 {
    font-size: 1.5rem !important;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .btn-lg {
    padding: 0.75rem 2rem !important;
    font-size: 0.95rem !important;
  }
  
  .portfolio-masonry {
    grid-template-columns: 1fr;
  }
  
  .parallax-section {
    background-attachment: scroll;
  }
  
  .service-card {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 767.98px) {
  .hero-content .display-1 {
    font-size: 2rem !important;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .btn-lg {
    padding: 0.65rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
  
  footer {
    text-align: center;
  }
  
  footer .text-md-start,
  footer .text-md-end {
    text-align: center !important;
  }
  
  .order-1 { order: 1 !important; }
  .order-2 { order: 2 !important; }
  .order-md-1 { order: 1 !important; }
  .order-md-2 { order: 2 !important; }
  .order-md-3 { order: 3 !important; }
  .order-lg-1 { order: 1 !important; }
  .order-lg-2 { order: 2 !important; }
  
  .p-md-5 {
    padding: 1.5rem !important;
  }
}

@media (min-width: 768px) {
  .text-md-start {
    text-align: left !important;
  }
  
  .text-md-end {
    text-align: right !important;
  }
  
  .mb-md-0 {
    margin-bottom: 0 !important;
  }
}

@media (min-width: 992px) {
  .ps-lg-5 {
    padding-left: 3rem !important;
  }
  
  .mb-lg-0 {
    margin-bottom: 0 !important;
  }
  
  .order-lg-1 {
    order: 1 !important;
  }
  
  .order-lg-2 {
    order: 2 !important;
  }
  
  .col-lg-2 {
    flex: 0 0 auto;
    width: 16.66666667%;
  }
  
  .col-lg-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .col-lg-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
  }
  
  .col-lg-5 {
    flex: 0 0 auto;
    width: 41.66666667%;
  }
  
  .col-lg-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .col-lg-7 {
    flex: 0 0 auto;
    width: 58.33333333%;
  }
  
  .col-lg-8 {
    flex: 0 0 auto;
    width: 66.66666667%;
  }
  
  .col-lg-10 {
    flex: 0 0 auto;
    width: 83.33333333%;
  }
  
  .col-lg-11 {
    flex: 0 0 auto;
    width: 91.66666667%;
  }
  
  .offset-lg-2 {
    margin-left: 16.66666667%;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--primary-color);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6d3610;
}

/* 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: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Selection */
::selection {
  background-color: var(--secondary-color);
  color: #ffffff;
}

::-moz-selection {
  background-color: var(--secondary-color);
  color: #ffffff;
}