/* Nordic Steel Architecture Studio - Custom Styles */

/* ===== CSS Variables ===== */
:root {
  --primary-color: #2E3440;
  --secondary-color: #88C0D0;
  --accent-light: #D8DEE9;
  --accent-dark: #4C566A;
  --text-light: #ECEFF4;
  --text-dark: #2E3440;
  --transition-speed: 0.4s;
  --shadow-sm: 0 2px 8px rgba(46, 52, 64, 0.1);
  --shadow-md: 0 4px 16px rgba(46, 52, 64, 0.15);
  --shadow-lg: 0 8px 32px rgba(46, 52, 64, 0.2);
}

/* ===== 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: #ECEFF4 !important;
  line-height: 1.7;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

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

.text-white.display-1,
.text-white.display-2,
.text-white.display-3,
.text-white.display-4,
.text-white.display-5,
.text-white.display-6 {
  color: #FFFFFF !important;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.lead, .fs-3, .fs-4, .fs-5 {
  color: var(--accent-dark) !important;
  line-height: 1.8;
}

.text-white.lead,
.text-white.fs-3,
.text-white.fs-4,
.text-white.fs-5 {
  color: var(--text-light) !important;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

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

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

.text-muted {
  color: var(--accent-dark) !important;
  opacity: 0.8;
}

.small {
  font-size: 0.875rem !important;
  color: var(--accent-dark) !important;
}

/* ===== Navbar Styles ===== */
.navbar {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B4252 100%) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(46, 52, 64, 0.3);
  padding: 1rem 0 !important;
  transition: all var(--transition-speed) ease;
}

.navbar.fixed-top {
  z-index: 1050;
}

.navbar.scrolled {
  padding: 0.5rem 0 !important;
  box-shadow: 0 6px 25px rgba(46, 52, 64, 0.4);
}

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

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

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1.2rem !important;
  margin: 0 0.2rem;
  border-radius: 6px;
  transition: all var(--transition-speed) ease;
  position: relative;
}

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

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
  color: #FFFFFF !important;
  background: rgba(136, 192, 208, 0.15) !important;
}

.navbar-dark .navbar-nav .nav-link:hover::before,
.navbar-dark .navbar-nav .nav-link.active::before {
  width: 60%;
}

.navbar-toggler {
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  padding: 0.5rem 0.75rem !important;
}

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

/* ===== Hero Slideshow Styles ===== */
.hero-slideshow {
  margin-top: 76px;
  height: 100vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
}

.carousel.slide {
  height: 100%;
}

.carousel-inner,
.carousel-item {
  height: 100%;
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(46, 52, 64, 0.7) 0%, rgba(46, 52, 64, 0.5) 50%, rgba(136, 192, 208, 0.3) 100%);
  z-index: 1;
}

.carousel-item img {
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) contrast(1.1);
}

.hero-slideshow .position-absolute {
  z-index: 2;
}

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

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

/* ===== Button Styles ===== */
.btn {
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none !important;
  border-radius: 8px !important;
  transition: all var(--transition-speed) ease !important;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #6FB3C8 100%) !important;
  color: var(--primary-color) !important;
  box-shadow: 0 4px 15px rgba(136, 192, 208, 0.4) !important;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6FB3C8 0%, var(--secondary-color) 100%) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 25px rgba(136, 192, 208, 0.6) !important;
  transform: translateY(-3px);
}

.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  color: #FFFFFF !important;
  background: transparent !important;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  color: var(--primary-color) !important;
  border-color: #FFFFFF !important;
  transform: translateY(-3px);
}

.btn-secondary {
  background: var(--primary-color) !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 15px rgba(46, 52, 64, 0.3) !important;
}

.btn-secondary:hover {
  background: var(--accent-dark) !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 25px rgba(46, 52, 64, 0.5) !important;
  transform: translateY(-3px);
}

/* ===== Card Styles ===== */
.card {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden;
  transition: all var(--transition-speed) ease !important;
  background: #FFFFFF !important;
}

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

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

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(46, 52, 64, 0.25) !important;
}

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-speed) ease;
}

.card:hover .card-img-top {
  transform: scale(1.08);
}

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

.card-title {
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  margin-bottom: 0.75rem !important;
}

.card-text {
  color: var(--accent-dark) !important;
  font-size: 0.95rem !important;
  line-height: 1.7;
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B4252 100%) !important;
  color: #FFFFFF !important;
  font-weight: 600 !important;
  border: none !important;
  padding: 1rem 1.5rem !important;
}

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

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

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

/* ===== Form Styles ===== */
.form-control,
.form-select {
  border: 2px solid #D8DEE9 !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  color: var(--text-dark) !important;
  background: #FFFFFF !important;
  transition: all var(--transition-speed) ease !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(136, 192, 208, 0.25) !important;
  background: #FFFFFF !important;
  color: var(--text-dark) !important;
}

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

.form-check-input {
  border: 2px solid var(--accent-dark) !important;
  width: 1.25rem !important;
  height: 1.25rem !important;
  cursor: pointer;
}

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

.form-check-label {
  color: var(--accent-dark) !important;
  margin-left: 0.5rem !important;
  cursor: pointer;
}

/* ===== Portfolio Styles ===== */
.filter-buttons {
  margin-bottom: 3rem;
}

.filter-btn {
  background: #FFFFFF !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--accent-light) !important;
  padding: 0.6rem 1.5rem !important;
  margin: 0.5rem !important;
  border-radius: 25px !important;
  font-weight: 600 !important;
  transition: all var(--transition-speed) ease !important;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(136, 192, 208, 0.3) !important;
}

.portfolio-masonry {
  column-count: 3;
  column-gap: 1.5rem;
}

.portfolio-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

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

.portfolio-item.hidden {
  display: none;
}

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.portfolio-card img {
  width: 100%;
  display: block;
  transition: transform 0.6s ease;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(46, 52, 64, 0.9) 0%, rgba(136, 192, 208, 0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity var(--transition-speed) ease;
  padding: 2rem;
  color: #FFFFFF !important;
}

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

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

/* ===== Social Links ===== */
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--primary-color) !important;
  color: #FFFFFF !important;
  border-radius: 50%;
  margin: 0 0.5rem;
  transition: all var(--transition-speed) ease;
  text-decoration: none !important;
}

.social-links a:hover {
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  transform: translateY(-5px) rotate(360deg);
  box-shadow: 0 6px 20px rgba(136, 192, 208, 0.4);
}

/* ===== Icons ===== */
.bi {
  font-size: 1.2rem;
  color: var(--secondary-color) !important;
}

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

.bi-telephone-fill,
.bi-envelope-fill,
.bi-geo-alt-fill {
  font-size: 1.5rem !important;
}

.d-inline-flex .bi {
  font-size: 2rem !important;
}

.fs-1 .bi {
  font-size: 3rem !important;
}

/* ===== Sections ===== */
section {
  position: relative;
}

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

.py-3 {
  padding: 2rem 0 !important;
}

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

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

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

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

/* ===== Background Variations ===== */
.bg-light {
  background-color: #ECEFF4 !important;
}

.bg-white {
  background-color: #FFFFFF !important;
}

.bg-dark {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B4252 100%) !important;
  color: #FFFFFF !important;
}

.bg-dark * {
  color: #FFFFFF !important;
}

.bg-dark .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ===== Image Styles ===== */
.img-fluid {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-speed) ease;
}

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

.rounded-circle {
  box-shadow: 0 4px 20px rgba(46, 52, 64, 0.2);
}

/* ===== Ratio (Video/Map Containers) ===== */
.ratio {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* ===== List Styles ===== */
.list-unstyled li {
  padding: 0.5rem 0;
  color: var(--accent-dark) !important;
}

.list-unstyled a {
  color: var(--accent-dark) !important;
  text-decoration: none !important;
  transition: all var(--transition-speed) ease;
}

.list-unstyled a:hover {
  color: var(--secondary-color) !important;
  padding-left: 0.5rem;
}

/* ===== Border Styles ===== */
.border-top {
  border-top: 2px solid var(--accent-light) !important;
}

.border-0 {
  border: none !important;
}

/* ===== Utilities ===== */
.overflow-hidden {
  overflow: hidden !important;
}

.position-sticky {
  position: sticky !important;
  top: 100px;
}

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

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.fw-semibold {
  font-weight: 600 !important;
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 991.98px) {
  .portfolio-masonry {
    column-count: 2;
  }
  
  .navbar-collapse {
    background: rgba(46, 52, 64, 0.98);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
  }
  
  .hero-slideshow {
    height: 80vh;
    min-height: 500px;
  }
  
  .display-1 {
    font-size: 3rem !important;
  }
  
  .display-3 {
    font-size: 2.5rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
}

@media (max-width: 767.98px) {
  .portfolio-masonry {
    column-count: 1;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
  }
  
  .hero-slideshow {
    height: 70vh;
    min-height: 400px;
  }
  
  .display-1 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .py-5 {
    padding: 2.5rem 0 !important;
  }
  
  .card-img-top {
    height: 200px;
  }
}

@media (max-width: 575.98px) {
  .d-flex.gap-3 {
    flex-direction: column;
    gap: 1rem !important;
  }
  
  .btn-lg {
    width: 100%;
  }
  
  .display-1 {
    font-size: 2rem !important;
  }
  
  .fs-3 {
    font-size: 1.2rem !important;
  }
  
  .social-links a {
    width: 40px;
    height: 40px;
    margin: 0 0.3rem;
  }
}

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

@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);
  }
}

/* ===== Smooth Scrollbar ===== */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--accent-light);
}

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

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

/* ===== Loading Spinner ===== */
.spinner-border {
  color: var(--secondary-color) !important;
}

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

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

/* ===== Text Selection ===== */
::selection {
  background: var(--secondary-color);
  color: var(--primary-color);
}

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