/* Nordic Frost Architecture Studio - Custom Styles */

/* ===== CSS Variables ===== */
:root {
  --primary-color: #2E3440;
  --secondary-color: #88C0D0;
  --accent-color: #D8DEE9;
  --light-bg: #ECEFF4;
  --white: #FFFFFF;
  --text-dark: #2E3440;
  --text-light: #4C566A;
  --shadow: rgba(46, 52, 64, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

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

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

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

.lead {
  font-size: 1.15rem;
  color: var(--text-light) !important;
}

.fst-italic {
  font-style: italic !important;
}

/* ===== Navigation Bar ===== */
.navbar {
  padding: 1.5rem 0;
  background: linear-gradient(180deg, rgba(46, 52, 64, 0.95) 0%, rgba(46, 52, 64, 0.85) 100%) !important;
  backdrop-filter: blur(10px);
  transition: var(--transition);
  z-index: 1030;
}

.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(46, 52, 64, 0.98) !important;
  box-shadow: 0 4px 20px rgba(46, 52, 64, 0.3);
}

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

.navbar-brand {
  color: var(--white) !important;
  font-weight: 700 !important;
  font-size: 1.5rem !important;
  letter-spacing: 1px;
  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 !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white) !important;
  background-color: rgba(136, 192, 208, 0.2) !important;
  transform: translateY(-2px);
}

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

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

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

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

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

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

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(46, 52, 64, 0.85) 0%, rgba(46, 52, 64, 0.6) 100%);
  z-index: 1;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-caption {
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  right: 0;
  bottom: auto;
  padding: 2rem;
}

.carousel-caption .display-2 {
  color: var(--white) !important;
  text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.carousel-caption .fs-5 {
  color: var(--accent-color) !important;
  text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1.2s ease-out;
}

.carousel-indicators {
  z-index: 3;
  margin-bottom: 2rem;
}

.carousel-indicators button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--secondary-color) !important;
  opacity: 0.5;
  border: none;
  margin: 0 6px;
  transition: var(--transition);
}

.carousel-indicators button.active {
  opacity: 1;
  transform: scale(1.3);
}

.carousel-control-prev,
.carousel-control-next {
  width: 60px;
  z-index: 3;
  opacity: 0.8;
  transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(136, 192, 208, 0.3);
  border-radius: 50%;
  padding: 10px;
}

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

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

/* ===== Buttons ===== */
.btn {
  font-weight: 600 !important;
  border-radius: 8px;
  transition: var(--transition);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

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

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

.btn-outline-secondary:hover {
  background-color: var(--secondary-color) !important;
  color: var(--white) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(136, 192, 208, 0.3);
}

.btn-sm {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
}

.btn:active {
  transform: translateY(0) !important;
}

/* ===== Cards ===== */
.card {
  border: none !important;
  border-radius: 12px;
  transition: var(--transition);
  overflow: hidden;
  background-color: var(--white) !important;
}

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

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

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

.card-text {
  color: var(--text-light) !important;
  line-height: 1.8;
}

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

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

.team-card {
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.team-card .card-img-top {
  transition: transform 0.5s ease;
  height: 350px;
  object-fit: cover;
}

.service-card {
  border: 2px solid transparent !important;
  transition: var(--transition);
}

.service-card:hover {
  border-color: var(--secondary-color) !important;
  background-color: rgba(136, 192, 208, 0.05) !important;
}

/* ===== Icons ===== */
.bi {
  display: inline-block;
  vertical-align: middle;
}

.bi-house-check,
.bi-tree,
.bi-laptop,
.bi-house-door,
.bi-building,
.bi-recycle,
.bi-grid-3x3,
.bi-badge-3d,
.bi-clipboard-check,
.bi-geo-alt,
.bi-telephone,
.bi-envelope,
.bi-linkedin,
.bi-instagram,
.bi-facebook,
.bi-chat-dots,
.bi-pencil-square,
.bi-gear,
.bi-star,
.bi-send,
.bi-info-circle,
.bi-lightbulb,
.bi-palette,
.bi-box-seam {
  color: var(--secondary-color) !important;
  transition: var(--transition);
}

.card:hover .bi,
.service-card:hover .bi {
  transform: scale(1.1) rotate(5deg);
}

.rounded-circle.bg-light {
  background-color: rgba(136, 192, 208, 0.15) !important;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.service-card:hover .rounded-circle.bg-light {
  background-color: var(--secondary-color) !important;
}

.service-card:hover .rounded-circle.bg-light .bi {
  color: var(--white) !important;
}

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

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

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

/* ===== Sections ===== */
.py-5 {
  padding: 5rem 0 !important;
}

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

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

section {
  position: relative;
  overflow: hidden;
}

/* ===== Images ===== */
.img-fluid {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  transition: var(--transition);
}

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

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

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

.opacity-25 {
  opacity: 0.25 !important;
}

/* ===== Forms ===== */
.form-control,
.form-select {
  border: 2px solid rgba(46, 52, 64, 0.15) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  color: var(--text-dark) !important;
  transition: var(--transition);
  background-color: var(--white) !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-color: var(--white) !important;
}

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

.form-check-input {
  border: 2px solid var(--secondary-color) !important;
  width: 1.25rem;
  height: 1.25rem;
}

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

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

.needs-validation .form-control:invalid {
  border-color: #BF616A !important;
}

.needs-validation .form-control:valid {
  border-color: #A3BE8C !important;
}

/* ===== Footer ===== */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B4252 100%);
  color: var(--white) !important;
  padding: 3rem 0 1rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8) !important;
  text-decoration: none !important;
  transition: var(--transition);
}

footer a:hover {
  color: var(--secondary-color) !important;
  padding-left: 5px;
}

footer .bi {
  color: var(--secondary-color) !important;
  margin-right: 0.5rem;
}

.list-unstyled {
  list-style: none;
  padding: 0;
}

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

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

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

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

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

.portfolio-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(46, 52, 64, 0.9) 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 1;
}

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

.portfolio-item .badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background-color: var(--secondary-color) !important;
  color: var(--white) !important;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

.filter-btn {
  background-color: transparent !important;
  border: 2px solid var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  margin: 0.25rem;
  transition: var(--transition);
}

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

/* ===== Modal ===== */
.modal-content {
  border: none !important;
  border-radius: 16px !important;
  overflow: hidden;
}

.modal-body {
  padding: 0 !important;
}

.modal-xl {
  max-width: 1200px;
}

.btn-close,
.btn-close-white {
  background-color: var(--secondary-color) !important;
  opacity: 1 !important;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  z-index: 10;
}

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

/* ===== Accordion ===== */
.accordion {
  --bs-accordion-border-color: rgba(46, 52, 64, 0.1);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(136, 192, 208, 0.25);
}

.accordion-item {
  border: 2px solid rgba(46, 52, 64, 0.1) !important;
  border-radius: 12px !important;
  margin-bottom: 1rem;
  overflow: hidden;
}

.accordion-button {
  background-color: var(--white) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
  padding: 1.5rem !important;
  border: none !important;
}

.accordion-button:not(.collapsed) {
  background-color: rgba(136, 192, 208, 0.1) !important;
  color: var(--primary-color) !important;
  box-shadow: none !important;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2388C0D0'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2388C0D0'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

.accordion-body {
  padding: 1.5rem !important;
  background-color: var(--white) !important;
  color: var(--text-light) !important;
}

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

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

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

.sticky-lg-top {
  position: sticky !important;
  top: 2rem;
}

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

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

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

.ratio {
  position: relative;
  width: 100%;
}

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

.ratio-4x3 {
  --bs-aspect-ratio: 75%;
}

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

/* ===== 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);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

/* ===== Responsive Design ===== */
@media (max-width: 991.98px) {
  .navbar {
    padding: 1rem 0;
  }
  
  .navbar-collapse {
    background-color: rgba(46, 52, 64, 0.98);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
  }
  
  .carousel {
    height: 70vh;
    min-height: 500px;
  }
  
  .carousel-caption {
    padding: 1rem;
  }
  
  .carousel-caption .display-2 {
    font-size: 2rem !important;
  }
  
  .display-3 {
    font-size: 2.5rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .display-5 {
    font-size: 1.75rem !important;
  }
  
  .py-5 {
    padding: 3rem 0 !important;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
  
  .sticky-lg-top {
    position: relative !important;
    top: 0;
  }
}

@media (max-width: 767.98px) {
  .carousel {
    height: 60vh;
    min-height: 450px;
  }
  
  .carousel-caption .display-2 {
    font-size: 1.75rem !important;
  }
  
  .carousel-caption .fs-5 {
    font-size: 0.95rem !important;
  }
  
  .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 0.95rem !important;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .display-2 {
    font-size: 2rem !important;
  }
  
  .display-3 {
    font-size: 1.75rem !important;
  }
  
  .display-4 {
    font-size: 1.5rem !important;
  }
  
  .py-5 {
    padding: 2.5rem 0 !important;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .team-card .card-img-top {
    height: 300px;
  }
  
  .modal-xl {
    max-width: 95%;
  }
}

@media (max-width: 575.98px) {
  .carousel {
    height: 50vh;
    min-height: 400px;
  }
  
  .carousel-caption .display-2 {
    font-size: 1.5rem !important;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.9rem !important;
  }
  
  .navbar-brand {
    font-size: 1.25rem !important;
  }
  
  footer {
    text-align: center;
  }
  
  .text-md-end {
    text-align: center !important;
  }
  
  .portfolio-item {
    height: 280px;
  }
}

/* ===== Print Styles ===== */
@media print {
  .navbar,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators,
  footer,
  .btn {
    display: none !important;
  }
  
  body {
    background-color: white !important;
    color: black !important;
  }
}

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

:focus-visible {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: 3px;
}

/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
  width: 12px;
}

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

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

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

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

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