/* Industrial Heritage Architecture Studio - Custom CSS */

/* ===== ROOT VARIABLES ===== */
:root {
  --primary-color: #2C4A3B;
  --secondary-color: #C8A882;
  --dark-accent: #1a2e23;
  --light-accent: #e8dcc8;
  --text-light: #f5f5f5;
  --text-dark: #2a2a2a;
  --transition-speed: 0.3s;
  --shadow-sm: 0 2px 8px rgba(44, 74, 59, 0.1);
  --shadow-md: 0 4px 16px rgba(44, 74, 59, 0.2);
  --shadow-lg: 0 8px 32px rgba(44, 74, 59, 0.25);
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark) !important;
  background-color: #fafafa !important;
  line-height: 1.6;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ===== TYPOGRAPHY ===== */
.display-3, .display-4, .display-5, .display-6 {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--primary-color) !important;
}

.lead {
  font-size: 1.15rem !important;
  font-weight: 400 !important;
  color: var(--text-dark) !important;
  line-height: 1.8 !important;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
}

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

/* ===== NAVIGATION ===== */
.navbar {
  background-color: var(--primary-color) !important;
  backdrop-filter: blur(10px);
  transition: all var(--transition-speed) ease;
  padding: 1rem 0 !important;
  box-shadow: var(--shadow-md);
}

.navbar.fixed-top {
  z-index: 1030 !important;
}

.navbar.sticky-top {
  z-index: 1020 !important;
}

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

.navbar-brand {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: var(--text-light) !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-speed) ease;
}

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

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

.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,
.navbar-nav .nav-link.active {
  color: var(--secondary-color) !important;
}

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

.navbar-toggler {
  border-color: var(--secondary-color) !important;
  background-color: transparent !important;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(200, 168, 130, 0.25) !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='%23C8A882' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== BUTTONS ===== */
.btn {
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 2rem !important;
  border-radius: 0 !important;
  transition: all var(--transition-speed) ease;
  border: 2px solid transparent !important;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-speed) ease;
  z-index: 0;
}

.btn:hover::before {
  transform: translate(-50%, -50%) scale(1);
}

.btn * {
  position: relative;
  z-index: 1;
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--dark-accent) !important;
  border-color: var(--dark-accent) !important;
  color: var(--text-light) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: #b8986f !important;
  border-color: #b8986f !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

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

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active {
  background-color: var(--text-light) !important;
  border-color: var(--text-light) !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
}

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

/* ===== CAROUSEL ===== */
.carousel {
  position: relative;
  min-height: 100vh;
}

.carousel-inner {
  min-height: 100vh;
}

.carousel-item {
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(44, 74, 59, 0.85) 0%, rgba(44, 74, 59, 0.6) 100%);
  z-index: 1;
}

.carousel-item img {
  object-fit: cover;
  min-height: 100vh;
}

.carousel-fade .carousel-item {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.carousel-fade .carousel-item.active {
  opacity: 1;
}

.carousel-item .position-absolute {
  z-index: 2;
}

.carousel-item .text-white {
  color: var(--text-light) !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== CARDS ===== */
.card {
  border: none !important;
  border-radius: 0 !important;
  transition: all var(--transition-speed) ease;
  background-color: #ffffff !important;
  overflow: hidden;
}

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

.card-header {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  border-bottom: 3px solid var(--secondary-color) !important;
  font-weight: 600 !important;
  padding: 1.25rem !important;
}

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

.certification-card {
  border: 2px solid var(--secondary-color) !important;
  transition: all var(--transition-speed) ease;
}

.certification-card:hover {
  border-color: var(--primary-color) !important;
  background-color: var(--light-accent) !important;
}

/* ===== FORMS ===== */
.form-label {
  font-weight: 600 !important;
  color: var(--primary-color) !important;
  margin-bottom: 0.5rem !important;
}

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

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

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

.form-check-input {
  border: 2px solid var(--primary-color) !important;
  border-radius: 0 !important;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
}

.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(44, 74, 59, 0.25) !important;
}

.form-check-label {
  cursor: pointer;
  color: var(--text-dark) !important;
}

.invalid-feedback {
  display: none;
  color: #dc3545 !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
  border-color: #dc3545 !important;
}

.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback {
  display: block;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
  border-color: #198754 !important;
}

/* ===== BADGES ===== */
.badge {
  font-weight: 600 !important;
  padding: 0.5rem 1rem !important;
  border-radius: 0 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem !important;
}

.badge.bg-primary {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}

.badge.bg-secondary {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
}

/* ===== IMAGES ===== */
.img-fluid {
  max-width: 100%;
  height: auto;
  transition: all var(--transition-speed) ease;
}

.img-fluid:hover {
  transform: scale(1.05);
}

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

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

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

.object-fit-cover {
  object-fit: cover !important;
}

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

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

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

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

.portfolio-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: var(--text-light) !important;
  opacity: 0;
  transition: all 0.5s ease;
  z-index: 2;
  width: 90%;
}

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

.portfolio-overlay h4 {
  color: var(--text-light) !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.portfolio-overlay p {
  color: var(--secondary-color) !important;
  font-weight: 500;
}

/* ===== TIMELINE ===== */
.timeline-wrapper {
  position: relative;
  padding: 2rem 0;
}

.timeline-item {
  position: relative;
  padding: 2rem 0;
  border-left: 3px solid var(--secondary-color);
  margin-left: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -9px;
  top: 2rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: 3px solid var(--secondary-color);
}

.timeline-item:hover::before {
  background-color: var(--secondary-color);
  border-color: var(--primary-color);
  transform: scale(1.3);
  transition: all var(--transition-speed) ease;
}

/* ===== ACCORDION ===== */
.accordion-item {
  border: none !important;
  border-radius: 0 !important;
  margin-bottom: 1rem;
  background-color: #ffffff !important;
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  margin-bottom: 0;
}

.accordion-button {
  background-color: var(--light-accent) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  border-radius: 0 !important;
  padding: 1.25rem 1.5rem !important;
  border: none !important;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  box-shadow: none !important;
}

.accordion-button::after {
  filter: brightness(0) saturate(100%) invert(24%) sepia(14%) saturate(1450%) hue-rotate(107deg) brightness(95%) contrast(88%);
}

.accordion-button:not(.collapsed)::after {
  filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(7500%) hue-rotate(324deg) brightness(104%) contrast(104%);
}

.accordion-button:hover {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
}

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

.accordion-body {
  padding: 1.5rem !important;
  background-color: #ffffff !important;
  color: var(--text-dark) !important;
  border-top: 2px solid var(--secondary-color) !important;
}

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

/* ===== PROGRESS BARS ===== */
.progress {
  height: 2rem !important;
  border-radius: 0 !important;
  background-color: var(--light-accent) !important;
  overflow: visible !important;
}

.progress-bar {
  background-color: var(--primary-color) !important;
  font-weight: 600 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light) !important;
  transition: width 1s ease-in-out;
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 3px;
  height: 100%;
  background-color: var(--secondary-color);
}

/* ===== ICONS ===== */
.bi,
.fas,
.fa {
  transition: all var(--transition-speed) ease;
}

.bi:hover,
.fas:hover,
.fa:hover {
  transform: scale(1.1);
  color: var(--secondary-color) !important;
}

/* ===== UTILITY CLASSES ===== */
.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-light {
  background-color: var(--light-accent) !important;
}

.bg-dark {
  background-color: var(--dark-accent) !important;
}

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

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

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

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

.border-top {
  border-top: 1px solid #dee2e6 !important;
}

.border-bottom {
  border-bottom: 1px solid #dee2e6 !important;
}

.rounded {
  border-radius: 0 !important;
}

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

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

section.py-5 {
  padding: 5rem 0 !important;
}

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

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

/* ===== RATIO ===== */
.ratio {
  position: relative;
  width: 100%;
}

.ratio::before {
  display: block;
  padding-top: var(--bs-aspect-ratio);
  content: "";
}

.ratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.ratio-21x9 {
  --bs-aspect-ratio: 42.857143%;
}

/* ===== LISTS ===== */
.list-unstyled {
  padding-left: 0 !important;
  list-style: none !important;
}

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

/* ===== LINKS ===== */
a {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  transition: all var(--transition-speed) ease;
}

a:hover {
  color: var(--secondary-color) !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  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 scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

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

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

.animate-scale {
  animation: scaleIn 0.8s ease-out forwards;
}

/* Stagger animation delays */
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-4 { animation-delay: 0.4s; opacity: 0; }
.animate-delay-5 { animation-delay: 0.5s; opacity: 0; }

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

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  .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; }
  
  .carousel-item { min-height: 70vh; }
  .carousel-inner { min-height: 70vh; }
  .carousel { min-height: 70vh; }
  
  section { padding: 3rem 0; }
  
  .btn { padding: 0.6rem 1.5rem !important; }
  .btn-lg { padding: 0.75rem 2rem !important; }
  
  .portfolio-masonry {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    border-bottom: 1px solid rgba(200, 168, 130, 0.2);
  }
  
  .navbar-nav .nav-link::after {
    display: none;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .display-3 { font-size: 3rem !important; }
  .display-4 { font-size: 2.5rem !important; }
  
  .portfolio-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .portfolio-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  .portfolio-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .navbar-expand-lg .navbar-nav .nav-link {
    padding: 0.5rem 1rem !important;
  }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .container-fluid {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
  
  .portfolio-masonry {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== CUSTOM HOVER EFFECTS ===== */
.hover-lift {
  transition: all var(--transition-speed) ease;
}

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

/* ===== FOOTER ===== */
footer {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  padding: 3rem 0 1rem;
  margin-top: 5rem;
}

footer a {
  color: var(--text-light) !important;
}

footer a:hover {
  color: var(--secondary-color) !important;
}

footer .border-top {
  border-color: rgba(200, 168, 130, 0.3) !important;
}

/* ===== LOADING SPINNER ===== */
.spinner-border {
  border-color: var(--secondary-color) !important;
  border-right-color: transparent !important;
}

/* ===== SCROLL TO TOP BUTTON ===== */
#scrollToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  border: 2px solid var(--secondary-color) !important;
  border-radius: 50% !important;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all var(--transition-speed) ease;
  box-shadow: var(--shadow-md);
}

#scrollToTop:hover {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

#scrollToTop.show {
  display: flex !important;
}

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

/* Focus styles for accessibility */
*:focus {
  outline: 2px solid var(--secondary-color) !important;
  outline-offset: 2px;
}

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

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .btn,
  footer,
  #scrollToTop {
    display: none !important;
  }
  
  body {
    background-color: white !important;
    color: black !important;
  }
  
  a {
    text-decoration: underline !important;
  }
}