/* ============================================================
   Custom Styles for David Dashti's Portfolio
============================================================ */

/* =========================
   Global Styles
========================= */
body {
  font-family: "Segoe UI", Arial, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   Stockholm Background
========================= */
.stockholm-background {
  background: url("/static/images/stockholm.webp") no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  min-height: 500px;
  transition: background-image 0.5s;
}
.stockholm-background.loaded {
  background-image: url("/static/images/stockholm.webp");
}
.stockholm-background::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
}
.stockholm-background > * {
  position: relative;
  z-index: 2;
}

/* =========================
   Navbar Styling
========================= */
.navbar {
  background: transparent !important;
  border-bottom: none;
  box-shadow: none;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.navbar-brand,
.nav-link {
  border: 1px solid #d3d3d3 !important; /* Light grey border */
  background: rgba(255, 255, 255, 0.75);
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 0.5rem 1.2rem;
  margin-top: 0.1rem;
  margin-bottom: 0.1rem;
}

/* Highlight the active navigation link */
.nav-link.active {
  background-color: #0d6efd !important;
  color: #fff !important;
  border-color: #0d6efd !important;
}

/* =========================
   Hero Section
========================= */
.hero {
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  text-align: center;
  background: none;
}
.hero-content {
  background: rgba(255, 255, 255, 0.6);
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-block;
  max-width: 1200px;
}
.hero-content .lead {
  white-space: nowrap;
}

/* =========================
   Custom Classes for Inline Styles
========================= */
.custom-hero-width {
  max-width: 950px;
}
.custom-hero-title {
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.2;
}
.custom-hero-lead {
  font-size: 1.35rem;
}
.contact-list {
  font-size: 1.1rem;
}

/* =========================
   Icon and Logo Styles
========================= */
.section-icon {
  width: 36px;
  height: 36px;
  margin-right: 14px;
  min-width: 36px;
}
.card-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-right: 1rem;
  min-width: 48px;
  display: inline-block;
  vertical-align: middle;
}

/* =========================
   Card and Project Styles
========================= */
.project-card,
.experience-card {
  min-height: 180px;
  position: relative;
}

/* =========================
   About Section
========================= */
.about-img {
  max-width: 260px;
}

/* =========================
   Contact Section
========================= */
.contact-icon {
  width: 28px;
  height: 28px;
  margin-right: 12px;
  min-width: 28px;
}

/* =========================
   Footer Styles
========================= */
.footer-blend {
  background-color: #f1f3f4 !important;
  color: #444 !important;
}

/* =========================
   TradingView Widget Responsive Styles
========================= */
.tradingview-responsive-widget {
  width: 100%;
  min-width: 980px;
  min-height: 610px;
  height: 610px;
  position: relative;
  margin: 0 auto;
}
.tradingview-widget-container__widget {
  height: 100% !important;
  min-height: 610px;
}
.tradingview-widget-outer-600 {
  height: 600px;
  position: relative;
}
.tradingview-widget-container-100 {
  height: 100%;
}

/* =========================
   Media Column Styles
========================= */
.media-col {
  max-width: 600px;
  margin: 0 auto;
}
.media-col .ratio {
  height: auto;
}
@media (max-width: 991.98px) {
  .media-col {
    max-width: 100%;
  }
}

/* =========================
   Media Row Styles
========================= */
.media-row {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

/* =========================
   Responsive Design
========================= */
@media (max-width: 1200px) {
  .hero-content {
    max-width: 98vw;
  }
}
@media (max-width: 768px) {
  .stockholm-background {
    background-attachment: scroll;
  }
  .hero-content .lead {
    white-space: normal;
    font-size: 1.1rem !important;
  }
  .hero-content {
    margin: 0 1rem;
    padding: 1.5rem 1rem;
  }
  .navbar {
    background: rgba(255, 255, 255, 0.95) !important;
  }
}

/* =========================
   SÖS Location Container
========================= */
.sos-location-container {
  max-width: 600px;
  margin: 0 auto;
}

/* =========================
   Iframe Borderless Utility
========================= */
.iframe-borderless {
  border: 0;
}

/* Sticky Navbar (Bootstrap's .sticky-top is used, but you can add custom tweaks if needed) */

/* Back to Top Button */
.back-to-top {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 9999;
  background-color: #0d6efd;
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 48px;
  height: 48px;
  font-size: 2rem;
  line-height: 1;
  text-align: center;
  transition: background 0.2s;
}
.back-to-top:hover {
  background-color: #084298;
}
