/* Nordic Slate Architecture Studio - CSS */

:root {
  --primary-color: #2E3440;
  --secondary-color: #88C0D0;
  --light-bg: #ECEFF4;
  --dark-text: #2E3440;
  --light-text: #D8DEE9;
  --accent: #5E81AC;
  --success: #A3BE8C;
  --danger: #BF616A;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

/* Navbar */
.navbar {
  background: rgba(46, 52, 64, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  z-index: 1030;
}

.navbar.scrolled {
  background: rgba(46, 52, 64, 0.98) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
  color: #ffffff !important;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: var(--transition);
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
  position: relative;
  text-decoration: none !important;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--secondary-color) !important;
}

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

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

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

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

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: var(--transition);
  text-decoration: none !important;
  border: 2px solid transparent;
}

.btn:focus {
  box-shadow: 0 0 0 0.25rem rgba(136, 192, 208, 0.25) !important;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background-color: #6FA8BC !important;
  border-color: #6FA8BC !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(136, 192, 208, 0.3) !important;
}

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

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(136, 192, 208, 0.3) !important;
}

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

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

/* Filter Buttons */
.filter-btn {
  background-color: transparent !important;
  border: 2px solid var(--primary-color) !important;
  color: var(--primary-color) !important;
  padding: 0.5rem 1.5rem;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(46, 52, 64, 0.3) !important;
}

/* Hero Section */
.position-relative.min-vh-100 {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B4252 100%);
  position: relative;
  overflow: hidden;
}

.position-relative.min-vh-100::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.03"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.5;
}

.position-relative.min-vh-100 .text-white {
  color: #ffffff !important;
  z-index: 2;
  position: relative;
}

.position-relative.min-vh-100 .display-1 {
  color: #ffffff !important;
  text-shadow: 2px 4px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.position-relative.min-vh-100 .lead {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 1px 2px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1.2s ease-out;
}

/* 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;
  right: 0;
  bottom: 0;
  background: rgba(46, 52, 64, 0.7);
}

.parallax-section .text-white {
  color: #ffffff !important;
  position: relative;
  z-index: 2;
}

/* Cards & Portfolio */
.portfolio-card,
.p-4.rounded.shadow,
.p-5.rounded.shadow-lg {
  background: #ffffff;
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid rgba(46, 52, 64, 0.1);
}

.portfolio-card:hover,
.p-4.rounded.shadow:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(46, 52, 64, 0.15) !important;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.portfolio-item img {
  transition: var(--transition);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(46, 52, 64, 0.95) 0%, rgba(46, 52, 64, 0.3) 50%, transparent 100%);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
}

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

.portfolio-overlay h5,
.portfolio-overlay .h5 {
  color: #ffffff !important;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: var(--transition);
}

.portfolio-overlay .small {
  color: rgba(255, 255, 255, 0.8) !important;
  transform: translateY(20px);
  transition: var(--transition) 0.1s;
}

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

/* Images */
.img-fluid {
  border-radius: 12px;
  transition: var(--transition);
}

.shadow {
  box-shadow: 0 10px 30px rgba(46, 52, 64, 0.1) !important;
}

.shadow-lg {
  box-shadow: 0 20px 50px rgba(46, 52, 64, 0.15) !important;
}

.shadow-sm {
  box-shadow: 0 5px 15px rgba(46, 52, 64, 0.08) !important;
}

/* Badges */
.badge {
  background-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 6px;
  font-size: 0.85rem;
}

/* Icons */
.bi {
  color: var(--secondary-color) !important;
  transition: var(--transition);
}

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

.rounded-circle {
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(136, 192, 208, 0.1);
  border: 2px solid var(--secondary-color);
  transition: var(--transition);
}

.rounded-circle:hover {
  background: var(--secondary-color);
  transform: rotate(360deg) scale(1.1);
}

.rounded-circle:hover .bi {
  color: var(--primary-color) !important;
}

/* Forms */
.form-control,
.form-select {
  border: 2px solid rgba(46, 52, 64, 0.2);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: var(--transition);
  background-color: #ffffff !important;
  color: var(--dark-text) !important;
}

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

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

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

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

.form-check-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(136, 192, 208, 0.25) !important;
}

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

/* Modal */
.modal-content {
  border-radius: 16px;
  border: none;
  background: #ffffff;
  overflow: hidden;
}

.modal-header {
  background: var(--primary-color);
  padding: 1.5rem 2rem;
}

.modal-title {
  color: #ffffff !important;
  font-weight: 700;
}

.btn-close,
.btn-close-white {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  transition: var(--transition);
}

.btn-close:hover,
.btn-close-white:hover {
  opacity: 1;
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

.modal-backdrop {
  background-color: rgba(46, 52, 64, 0.8) !important;
}

/* Background Colors */
.bg-light {
  background-color: var(--light-bg) !important;
}

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

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

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

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

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

/* Links */
a {
  color: var(--secondary-color) !important;
  text-decoration: none;
  transition: var(--transition);
}

a:hover,
a:focus {
  color: var(--accent) !important;
  text-decoration: underline;
}

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

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

footer a {
  color: rgba(255, 255, 255, 0.8) !important;
}

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

.list-unstyled a {
  display: inline-block;
  padding: 0.25rem 0;
}

/* Footer */
footer {
  background: var(--primary-color) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

footer h5,
footer .h5,
footer h6,
footer .h6 {
  color: #ffffff !important;
}

footer .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

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

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

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

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

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

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(46, 52, 64, 0.98);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
  }

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

  .display-3 {
    font-size: 2.5rem !important;
  }

  .display-4 {
    font-size: 2rem !important;
  }

  .display-5 {
    font-size: 1.75rem !important;
  }

  .btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .display-1 {
    font-size: 2.5rem !important;
  }

  .display-3 {
    font-size: 2rem !important;
  }

  .display-4 {
    font-size: 1.75rem !important;
  }

  .lead {
    font-size: 1.1rem;
  }

  .parallax-section {
    background-attachment: scroll;
    min-height: 300px;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .display-1 {
    font-size: 2rem !important;
  }

  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

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

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

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

/* Utility Classes */
.overflow-hidden {
  overflow: hidden !important;
}

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

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

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

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

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

.min-vh-100 {
  min-height: 100vh !important;
}

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

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

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

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

.align-items-start {
  align-items: flex-start !important;
}

.align-items-end {
  align-items: flex-end !important;
}

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

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

.justify-content-end {
  justify-content: flex-end !important;
}

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

.mx-auto {
  margin-left: auto !important;
  margin-right: auto !important;
}

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

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

/* Smooth Transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

button,
a,
.btn {
  transition: var(--transition) !important;
}

/* Loading State */
.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Success/Error States */
.is-valid {
  border-color: var(--success) !important;
}

.is-invalid {
  border-color: var(--danger) !important;
}

.invalid-feedback,
.valid-feedback {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1020;
  box-shadow: 0 5px 20px rgba(136, 192, 208, 0.4);
}

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

.scroll-to-top:hover {
  background: var(--accent) !important;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(136, 192, 208, 0.5);
}