/* Nordic Crystal Architecture Studio - Custom Styles */

/* ===================================
   CSS Variables & Root
   =================================== */
:root {
  --primary-color: #2E3440;
  --secondary-color: #88C0D0;
  --accent-color: #5E81AC;
  --light-bg: #ECEFF4;
  --dark-text: #2E3440;
  --light-text: #D8DEE9;
  --shadow-sm: 0 2px 4px rgba(46, 52, 64, 0.1);
  --shadow-md: 0 4px 8px rgba(46, 52, 64, 0.15);
  --shadow-lg: 0 8px 16px rgba(46, 52, 64, 0.2);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ===================================
   Global Styles
   =================================== */
* {
  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(--dark-text);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

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

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

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

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

/* ===================================
   Navigation
   =================================== */
.navbar {
  padding: 1rem 0;
  transition: all var(--transition-base);
  background-color: var(--primary-color) !important;
}

.navbar.sticky-top {
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.navbar-dark {
  background-color: rgba(46, 52, 64, 0.95) !important;
}

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

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

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

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

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

.navbar-nav {
  gap: 0.5rem;
}

.nav-item {
  position: relative;
}

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

.nav-link:hover {
  color: #ffffff !important;
  background-color: rgba(136, 192, 208, 0.15);
  transform: translateY(-1px);
}

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

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

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

/* ===================================
   Hero Section
   =================================== */
.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, #3B4252 50%, var(--accent-color) 100%);
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h100v100H0z" fill="none"/%3E%3Cpath d="M50 0L100 50L50 100L0 50z" fill="%2388C0D0" opacity="0.03"/%3E%3C/svg%3E');
  opacity: 0.5;
  animation: patternMove 60s linear infinite;
}

@keyframes patternMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(100px, 100px); }
}

.hero-section .position-relative {
  z-index: 2;
}

.hero-section .display-2 {
  color: #ffffff !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 0.8s ease-out;
}

.hero-section .lead {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 1s ease-out 0.2s both;
}

/* ===================================
   Buttons
   =================================== */
.btn {
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: 8px;
  transition: all var(--transition-base);
  border-width: 2px;
  position: relative;
  overflow: hidden;
}

.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-lg {
  font-size: 1.1rem;
  padding: 0.875rem 2rem !important;
}

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

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

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.8) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

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

.btn-outline-dark {
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

.btn-outline-dark:hover {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(46, 52, 64, 0.3) !important;
}

.btn-outline-secondary {
  border-color: var(--secondary-color) !important;
  color: var(--secondary-color) !important;
  font-weight: 600 !important;
}

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

.px-5 {
  padding-left: 3rem !important;
  padding-right: 3rem !important;
}

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

/* ===================================
   Cards
   =================================== */
.card {
  border: none !important;
  border-radius: 12px !important;
  overflow: hidden;
  transition: all var(--transition-base);
  background-color: #ffffff;
  height: 100%;
}

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

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

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

.card-body {
  padding: 1.5rem;
}

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

.card-text {
  color: #6c757d;
  line-height: 1.7;
}

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

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

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

/* ===================================
   Project Cards
   =================================== */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  height: 350px;
  background-color: var(--primary-color);
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-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.7) 50%, rgba(46, 52, 64, 0) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

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

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

.project-details {
  color: #ffffff;
  transform: translateY(20px);
  transition: transform var(--transition-base);
}

.project-card:hover .project-details {
  transform: translateY(0);
}

.project-details h4 {
  color: #ffffff !important;
  margin-bottom: 0.5rem;
}

.project-details p {
  color: rgba(255, 255, 255, 0.8) !important;
  margin-bottom: 0.75rem;
}

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

.badge.bg-light {
  background-color: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* ===================================
   Images
   =================================== */
.img-fluid {
  max-width: 100%;
  height: auto;
  display: block;
}

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

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

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

/* ===================================
   Forms
   =================================== */
.contact-form {
  background-color: #ffffff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

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

.form-control,
.form-select {
  border: 2px solid #e5e9f0;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  transition: all var(--transition-fast);
  font-size: 1rem;
  background-color: #ffffff !important;
  color: var(--primary-color) !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;
  outline: none;
}

.form-control::placeholder {
  color: #a0a8b5;
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ===================================
   Alert
   =================================== */
.alert {
  border-radius: 8px;
  border: none;
  padding: 1rem 1.5rem;
  font-weight: 500;
}

.alert-success {
  background-color: #d8f3dc;
  color: #1b4332;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
}

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

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

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

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

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

.mb-5 {
  margin-bottom: 5rem !important;
}

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

.mb-3 {
  margin-bottom: 1.5rem !important;
}

.mb-2 {
  margin-bottom: 1rem !important;
}

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

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

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

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

.bi-geo-alt-fill,
.bi-telephone-fill,
.bi-envelope-fill,
.bi-house-door,
.bi-building,
.bi-globe,
.bi-grid-3x3,
.bi-map,
.bi-award,
.bi-geo-alt,
.bi-telephone,
.bi-envelope {
  font-size: 1.5rem;
  color: var(--secondary-color);
}

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

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

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

.fs-5 {
  font-size: 1.25rem !important;
}

.d-inline-flex {
  display: inline-flex !important;
  align-items: center;
  gap: 0.75rem;
}

/* ===================================
   Ratio (Video/Image Containers)
   =================================== */
.ratio {
  position: relative;
  width: 100%;
}

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

.ratio-16x9 {
  --bs-aspect-ratio: 56.25%;
}

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

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

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

/* ===================================
   Utilities
   =================================== */
.text-center {
  text-align: center !important;
}

.text-md-start {
  text-align: left !important;
}

.text-md-end {
  text-align: right !important;
}

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

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

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

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

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

.top-50 {
  top: 50% !important;
}

.bottom-0 {
  bottom: 0 !important;
}

.start-0 {
  left: 0 !important;
}

.start-50 {
  left: 50% !important;
}

.translate-middle {
  transform: translate(-50%, -50%) !important;
}

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

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

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

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

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

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

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

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

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

.ms-auto {
  margin-left: auto !important;
}

.ms-4 {
  margin-left: 2rem !important;
}

.me-2 {
  margin-right: 0.5rem !important;
}

.me-3 {
  margin-right: 1.5rem !important;
}

.me-md-4 {
  margin-right: 2rem !important;
}

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

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

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

.ps-lg-5 {
  padding-left: 3rem !important;
}

.pe-lg-5 {
  padding-right: 3rem !important;
}

.small {
  font-size: 0.875rem;
}

/* ===================================
   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: all 0.8s ease-out;
}

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

/* ===================================
   Footer
   =================================== */
footer {
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1.5rem;
}

footer h5,
footer .h5 {
  color: #ffffff !important;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

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

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

footer .mb-0 {
  margin-bottom: 0 !important;
}

/* ===================================
   Responsive Utilities
   =================================== */
@media (max-width: 767.98px) {
  .text-md-start {
    text-align: center !important;
  }
  
  .text-md-end {
    text-align: center !important;
  }
  
  .mb-md-0 {
    margin-bottom: 1rem !important;
  }
  
  .flex-md-row {
    flex-direction: column !important;
  }
  
  .align-items-md-start {
    align-items: center !important;
  }
}

@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 auto;
    width: 33.333333%;
  }
  
  .col-md-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .flex-sm-row {
    flex-direction: row !important;
  }
}

@media (min-width: 992px) {
  .col-lg-2 {
    flex: 0 0 auto;
    width: 16.666667%;
  }
  
  .col-lg-3 {
    flex: 0 0 auto;
    width: 25%;
  }
  
  .col-lg-4 {
    flex: 0 0 auto;
    width: 33.333333%;
  }
  
  .col-lg-5 {
    flex: 0 0 auto;
    width: 41.666667%;
  }
  
  .col-lg-6 {
    flex: 0 0 auto;
    width: 50%;
  }
  
  .col-lg-7 {
    flex: 0 0 auto;
    width: 58.333333%;
  }
  
  .col-lg-8 {
    flex: 0 0 auto;
    width: 66.666667%;
  }
  
  .offset-lg-1 {
    margin-left: 8.333333%;
  }
  
  .offset-lg-2 {
    margin-left: 16.666667%;
  }
  
  .order-lg-1 {
    order: 1 !important;
  }
  
  .order-lg-2 {
    order: 2 !important;
  }
  
  .flex-lg-row-reverse {
    flex-direction: row-reverse !important;
  }
  
  .mb-lg-0 {
    margin-bottom: 0 !important;
  }
  
  .ps-lg-5 {
    padding-left: 3rem !important;
  }
  
  .pe-lg-5 {
    padding-right: 3rem !important;
  }
}

/* ===================================
   Container System
   =================================== */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* ===================================
   Grid System
   =================================== */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.g-0 {
  margin-right: 0;
  margin-left: 0;
}

.g-0 > * {
  padding-right: 0;
  padding-left: 0;
}

.g-3 {
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

.g-3 > * {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  margin-bottom: 1.5rem;
}

.g-4 {
  margin-right: -1rem;
  margin-left: -1rem;
}

.g-4 > * {
  padding-right: 1rem;
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.g-5 {
  margin-right: -1.5rem;
  margin-left: -1.5rem;
}

.g-5 > * {
  padding-right: 1.5rem;
  padding-left: 1.5rem;
  margin-bottom: 3rem;
}

[class*="col-"] {
  padding-right: 15px;
  padding-left: 15px;
}

.col-12 {
  flex: 0 0 auto;
  width: 100%;
}

/* ===================================
   Mobile Responsive (max-width: 991px)
   =================================== */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 80px 0 60px;
    min-height: auto;
  }
  
  .display-2 {
    font-size: 2.5rem !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .display-5 {
    font-size: 1.5rem !important;
  }
  
  .lead {
    font-size: 1.1rem;
  }
  
  .btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.5rem !important;
  }
  
  .px-5 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .project-card {
    height: 280px;
  }
  
  .card-img-top {
    height: 200px;
  }
  
  .position-sticky {
    position: relative !important;
    top: 0;
  }
  
  .fs-1 {
    font-size: 2rem !important;
  }
  
  .fs-2 {
    font-size: 1.75rem !important;
  }
}

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

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

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

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

/* ===================================
   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 styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */
@media print {
  .navbar,
  .btn,
  footer {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .container {
    max-width: 100%;
  }
}