/* Nordic Slate Architecture Studio - Custom Styles */

/* ================================
   CSS Variables & Base Styles
   ================================ */
:root {
  --primary-color: #2E3440;
  --secondary-color: #88C0D0;
  --accent-light: #D8DEE9;
  --accent-dark: #3B4252;
  --text-light: #ECEFF4;
  --text-dark: #2E3440;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
  --shadow-sm: 0 2px 8px rgba(46, 52, 64, 0.08);
  --shadow-md: 0 4px 16px rgba(46, 52, 64, 0.12);
  --shadow-lg: 0 8px 32px rgba(46, 52, 64, 0.16);
  --shadow-xl: 0 16px 48px rgba(46, 52, 64, 0.2);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

/* ================================
   Typography
   ================================ */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: var(--text-dark) !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;
}

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

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

.fs-4, .fs-5 {
  color: var(--text-dark) !important;
}

.text-white .fs-4,
.text-white .fs-5 {
  color: rgba(255, 255, 255, 0.9) !important;
}

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

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

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

/* ================================
   Navbar Styles
   ================================ */
.navbar {
  background: rgba(46, 52, 64, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 1rem 0 !important;
  transition: var(--transition-smooth);
  z-index: 1050;
}

.navbar.scrolled {
  background: rgba(46, 52, 64, 0.98) !important;
  box-shadow: var(--shadow-lg);
  padding: 0.5rem 0 !important;
}

.navbar-brand {
  color: #FFFFFF !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
}

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

.navbar-toggler {
  border: 2px solid var(--secondary-color) !important;
  padding: 0.5rem 0.75rem !important;
  transition: var(--transition-fast);
}

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

.navbar-nav {
  align-items: center;
}

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

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

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

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

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

/* ================================
   Carousel Styles
   ================================ */
.carousel {
  height: 100vh;
  min-height: 600px;
}

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

.carousel-item {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-dark) 100%);
  position: relative;
}

.carousel-item::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="%2388C0D0" fill-opacity="0.05"%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.3;
}

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

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

.carousel .text-center {
  z-index: 10;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ================================
   Button Styles
   ================================ */
.btn {
  font-weight: 600 !important;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  font-size: 0.9rem !important;
  position: relative;
  overflow: hidden;
  border-width: 2px !important;
}

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

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

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

.btn-outline-light:hover {
  color: var(--primary-color) !important;
  background: #FFFFFF !important;
  border-color: #FFFFFF !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

.btn-light:hover {
  color: #FFFFFF !important;
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

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

/* ================================
   Badge Styles
   ================================ */
.badge {
  background: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  letter-spacing: 1px;
  border-radius: 6px;
  text-transform: uppercase;
  font-size: 0.75rem !important;
}

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

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

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

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

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

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

.card-text {
  color: #6c757d !important;
  line-height: 1.6;
}

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

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

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

/* ================================
   Portfolio Styles
   ================================ */
.portfolio-item {
  cursor: pointer;
  transition: var(--transition-smooth);
  opacity: 1;
}

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

.portfolio-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 350px;
  background: var(--primary-color);
}

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(46, 52, 64, 0.95), rgba(136, 192, 208, 0.85));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
  padding: 2rem;
}

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

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

.portfolio-overlay h3 {
  color: #FFFFFF !important;
  margin-bottom: 1rem;
}

.portfolio-overlay p {
  color: rgba(255, 255, 255, 0.9) !important;
  text-align: center;
}

.filter-btn {
  background: transparent !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--accent-light) !important;
  padding: 0.5rem 1.5rem !important;
  margin: 0.25rem !important;
  border-radius: 25px !important;
  transition: var(--transition-fast) !important;
  font-size: 0.9rem !important;
  text-transform: none !important;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--secondary-color) !important;
  color: #FFFFFF !important;
  border-color: var(--secondary-color) !important;
  transform: translateY(-2px);
}

/* ================================
   Form Styles
   ================================ */
.form-control,
.form-select {
  border: 2px solid var(--accent-light) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  transition: var(--transition-fast);
  background: #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.25rem rgba(136, 192, 208, 0.25) !important;
  background: #FFFFFF !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-light) !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-input:focus {
  box-shadow: 0 0 0 0.25rem rgba(136, 192, 208, 0.25) !important;
}

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

.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;
}

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

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

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

.rounded-circle {
  width: 60px !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--secondary-color) !important;
  color: #FFFFFF !important;
  font-size: 1.5rem !important;
  transition: var(--transition-smooth);
}

.rounded-circle:hover {
  background: var(--primary-color) !important;
  transform: scale(1.1) rotate(5deg);
}

/* ================================
   Ratio (Responsive Embeds)
   ================================ */
.ratio {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

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

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

/* ================================
   Image Utilities
   ================================ */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.rounded {
  border-radius: 12px !important;
}

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

.list-unstyled li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--accent-light);
  color: var(--text-dark) !important;
  transition: var(--transition-fast);
}

.list-unstyled li:last-child {
  border-bottom: none;
}

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

.list-unstyled li .bi {
  color: var(--secondary-color) !important;
  margin-right: 0.75rem;
}

/* ================================
   Link Styles
   ================================ */
a {
  color: var(--secondary-color) !important;
  text-decoration: none !important;
  transition: var(--transition-fast);
}

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

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

/* ================================
   Section Spacing
   ================================ */
.py-5 {
  padding-top: 4rem !important;
  padding-bottom: 4rem !important;
}

.my-5 {
  margin-top: 4rem !important;
  margin-bottom: 4rem !important;
}

.mt-5, .my-5 {
  margin-top: 4rem !important;
}

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

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

/* ================================
   Animations
   ================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

.animate-on-scroll {
  opacity: 0;
  transition: var(--transition-smooth);
}

.animate-on-scroll.animated {
  opacity: 1;
  animation: slideInUp 0.8s ease-out forwards;
}

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

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: rgba(46, 52, 64, 0.98);
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
  }
  
  .navbar-nav {
    gap: 0.5rem !important;
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 8px;
  }
  
  .nav-link:hover {
    background: rgba(136, 192, 208, 0.1);
  }
  
  .carousel {
    height: 80vh;
    min-height: 500px;
  }
  
  .display-1 {
    font-size: 2.5rem !important;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .display-3 {
    font-size: 1.75rem !important;
  }
  
  .display-4 {
    font-size: 1.5rem !important;
  }
  
  .display-5 {
    font-size: 1.25rem !important;
  }
  
  .display-6 {
    font-size: 1.1rem !important;
  }
  
  .btn-lg {
    padding: 0.75rem 2rem !important;
  }
  
  .portfolio-card {
    height: 300px;
  }
}

@media (max-width: 767.98px) {
  .carousel {
    height: 70vh;
    min-height: 400px;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .display-1 {
    font-size: 2rem !important;
  }
  
  .display-2 {
    font-size: 1.75rem !important;
  }
  
  .fs-4 {
    font-size: 1rem !important;
  }
  
  .fs-5 {
    font-size: 0.95rem !important;
  }
  
  .btn-lg {
    padding: 0.65rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
  
  .card-img-top {
    height: 200px;
  }
  
  .portfolio-card {
    height: 250px;
  }
  
  .rounded-circle {
    width: 50px !important;
    height: 50px !important;
    font-size: 1.25rem !important;
  }
}

@media (max-width: 575.98px) {
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .carousel {
    height: 60vh;
    min-height: 350px;
  }
  
  .display-1 {
    font-size: 1.75rem !important;
  }
  
  .display-2 {
    font-size: 1.5rem !important;
  }
  
  .navbar-brand {
    font-size: 1.25rem !important;
  }
}

/* ================================
   Print Styles
   ================================ */
@media print {
  .navbar,
  .btn,
  .carousel {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .shadow,
  .shadow-sm,
  .shadow-lg {
    box-shadow: none !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-visible {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: 3px !important;
}

/* ================================
   Utility Classes
   ================================ */
.gap-2 {
  gap: 0.5rem !important;
}

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

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

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

.g-0 {
  --bs-gutter-x: 0 !important;
  --bs-gutter-y: 0 !important;
}

.g-3 {
  --bs-gutter-x: 1rem !important;
  --bs-gutter-y: 1rem !important;
}

.g-4 {
  --bs-gutter-x: 1.5rem !important;
  --bs-gutter-y: 1.5rem !important;
}

.g-5 {
  --bs-gutter-x: 3rem !important;
  --bs-gutter-y: 3rem !important;
}

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

.fw-medium {
  font-weight: 500 !important;
}

.small {
  font-size: 0.875rem !important;
}

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

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

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

.p-5 {
  padding: 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;
}

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

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

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

/* ================================
   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 State
   ================================ */
.loading {
  pointer-events: none;
  opacity: 0.6;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid var(--accent-light);
  border-top-color: var(--secondary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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