/* Nordic Frost Architecture Studio - Custom Styles */

/* =========================
   ROOT VARIABLES & RESET
   ========================= */
:root {
  --primary-color: #2E3440;
  --secondary-color: #88C0D0;
  --light-bg: #ECEFF4;
  --dark-text: #2E3440;
  --light-text: #D8DEE9;
  --accent-frost: #8FBCBB;
  --accent-snow: #E5E9F0;
  --accent-ice: #B4C5D9;
  --transition-smooth: all 0.4s 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);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
  font-family: var(--font-primary);
  color: var(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.7;
  overflow-x: hidden;
}

/* =========================
   TYPOGRAPHY
   ========================= */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary-color) !important;
  line-height: 1.2;
}

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

.fs-5 {
  color: var(--dark-text) !important;
  line-height: 1.8;
}

/* =========================
   NAVIGATION
   ========================= */
.navbar {
  background: rgba(46, 52, 64, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(136, 192, 208, 0.2);
  transition: var(--transition-smooth);
  z-index: 1030 !important;
}

.navbar.sticky-top {
  box-shadow: var(--shadow-md);
}

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

.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;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: 6px;
  transition: var(--transition-fast);
  position: relative;
}

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

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

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

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

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

/* =========================
   HERO SLIDESHOW
   ========================= */
.hero-slideshow {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, #434C5E 100%);
}

.slideshow-container {
  top: 0;
  left: 0;
  animation: fadeIn 1s ease-in;
}

.slide {
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  filter: brightness(0.7);
}

.slide.active {
  opacity: 1;
  animation: zoomIn 20s linear forwards;
}

.slide img {
  object-fit: cover !important;
  width: 100%;
  height: 100%;
}

@keyframes zoomIn {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

.hero-slideshow .position-absolute.top-50 {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: slideUp 1s ease-out 0.3s both;
}

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

.hero-slideshow .display-2,
.hero-slideshow .display-3 {
  color: #FFFFFF !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.hero-slideshow .lead {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.3rem;
  font-weight: 400;
}

/* =========================
   BUTTONS
   ========================= */
.btn {
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: var(--transition-smooth);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.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;
  z-index: -1;
}

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

.btn-primary {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(136, 192, 208, 0.3);
}

.btn-primary:hover {
  background: #6FADC0 !important;
  border-color: #6FADC0 !important;
  color: #FFFFFF !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(136, 192, 208, 0.4);
}

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

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

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

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

/* =========================
   CARDS & SECTIONS
   ========================= */
.card {
  border: none !important;
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

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

.card-body {
  padding: 2rem;
}

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

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

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

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

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

/* =========================
   PORTFOLIO
   ========================= */
.portfolio-item {
  margin-bottom: 2rem;
  animation: fadeInUp 0.6s ease-out both;
}

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

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

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

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

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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-smooth);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #FFFFFF;
}

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

.portfolio-overlay h4,
.portfolio-overlay h5 {
  color: #FFFFFF !important;
  transform: translateY(20px);
  transition: var(--transition-smooth);
}

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

.filter-btn {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color) !important;
  padding: 0.6rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition-fast);
  cursor: pointer;
  margin: 0.5rem;
}

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

/* =========================
   BADGES
   ========================= */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

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

/* =========================
   ICONS
   ========================= */
.bi {
  vertical-align: middle;
  transition: var(--transition-fast);
}

.bi-building,
.bi-calendar-check,
.bi-geo-alt,
.bi-telephone,
.bi-envelope,
.bi-house-door,
.bi-chevron-down,
.bi-bank,
.bi-tree,
.bi-grid-3x3,
.bi-map,
.bi-chat-dots,
.bi-clock-history,
.bi-currency-dollar,
.bi-leaf-fill,
.bi-award-fill,
.bi-lightning-charge-fill,
.bi-droplet-fill,
.bi-tree-fill,
.bi-recycle,
.bi-check-circle-fill,
.bi-building-check,
.bi-house-heart-fill,
.bi-flower1,
.bi-geo-alt-fill,
.bi-telephone-fill,
.bi-envelope-fill,
.bi-clock-fill,
.bi-train-front,
.bi-bus-front,
.bi-p-circle,
.bi-info-circle {
  color: var(--secondary-color);
}

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

/* =========================
   FORMS
   ========================= */
.form-control,
.form-select {
  border: 2px solid var(--accent-snow);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition-fast);
  background: #FFFFFF;
  color: var(--dark-text) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--secondary-color) !important;
  box-shadow: 0 0 0 4px rgba(136, 192, 208, 0.15) !important;
  outline: none;
}

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

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--accent-snow);
  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 4px rgba(136, 192, 208, 0.15) !important;
}

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

/* =========================
   PROGRESS BARS
   ========================= */
.progress {
  height: 1rem;
  border-radius: 10px;
  background-color: var(--accent-snow);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--secondary-color) 0%, var(--accent-frost) 100%);
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 10px;
}

/* =========================
   BACKGROUND UTILITIES
   ========================= */
.bg-light {
  background-color: var(--light-bg) !important;
}

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

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

/* =========================
   TEXT UTILITIES
   ========================= */
.text-white {
  color: #FFFFFF !important;
}

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

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

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

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

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

footer h4,
footer h5,
footer .h4,
footer .h5 {
  color: #FFFFFF !important;
  font-weight: 700;
}

footer a {
  color: var(--light-text) !important;
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-block;
}

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

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

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

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

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

/* Scroll animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

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

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

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

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

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

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

/* =========================
   IMAGE UTILITIES
   ========================= */
.img-fluid {
  max-width: 100%;
  height: auto;
  transition: var(--transition-smooth);
}

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

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

/* =========================
   POSITION UTILITIES
   ========================= */
.position-relative {
  position: relative !important;
}

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

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

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

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

/* =========================
   Z-INDEX UTILITIES
   ========================= */
.z-2 {
  z-index: 2 !important;
}

.z-3 {
  z-index: 3 !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;
  }

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

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

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

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

  .portfolio-card {
    height: 300px;
  }

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

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

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

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

  .lead {
    font-size: 1.1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.95rem;
  }

  .portfolio-card {
    height: 250px;
  }

  .card-body {
    padding: 1.5rem;
  }

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

@media (max-width: 575.98px) {
  .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* =========================
   ACCESSIBILITY
   ========================= */
:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
  outline: none;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================
   PRINT STYLES
   ========================= */
@media print {
  .navbar,
  .btn,
  footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    text-decoration: underline;
  }
}