/* ==========================================================================
   Dr. Azzer Professional Portfolio & Blog - Design System & Custom CSS
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --primary-navy: #0f2942;
  --brand-blue: #1b365d;
  --brand-blue-hover: #122544;
  --teal-accent: #0d9488;
  --teal-light: #e6fffa;
  --gold-accent: #c5a059;
  --gold-hover: #b08c46;
  --gold-light: #fef9ed;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  
  /* Fonts */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Shadows & Radius */
  --shadow-sm: 0 2px 4px rgba(15, 41, 66, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 41, 66, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 41, 66, 0.12);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

/* =========================================
   Base Setup
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  color: var(--primary-navy);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--teal-accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* =========================================
   Navigation Header
   ========================================= */
.navbar-custom {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  padding: 1rem 0;
  transition: var(--transition);
  z-index: 1030;
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary-navy) !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand .brand-name {
  display: block;
  line-height: 1.1;
}

.navbar-brand span.title-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal-accent);
  display: block;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark) !important;
  padding: 0.45rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue) !important;
  background-color: rgba(27, 54, 93, 0.06);
}

.navbar-toggler {
  border: none !important;
  box-shadow: none !important;
  padding: 0.3rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

/* Mobile navbar collapse */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #ffffff;
    border-radius: var(--radius-md);
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .navbar-nav .nav-item {
    border-bottom: 1px solid var(--border-color);
  }

  .navbar-nav .nav-item:last-child {
    border-bottom: none;
  }

  .navbar-nav .nav-link {
    padding: 0.65rem 0.5rem !important;
  }

  .navbar-nav .ms-lg-2 {
    margin-left: 0 !important;
    margin-top: 0.75rem;
  }

  .navbar-nav .ms-lg-2 a {
    display: block;
    text-align: center;
  }
}

/* =========================================
   Buttons
   ========================================= */
.btn-brand {
  background-color: var(--brand-blue);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--brand-blue);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.btn-brand:hover {
  background-color: var(--brand-blue-hover);
  border-color: var(--brand-blue-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline-brand {
  background-color: transparent;
  color: var(--brand-blue) !important;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--brand-blue);
  transition: var(--transition);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.btn-outline-brand:hover {
  background-color: var(--brand-blue);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.btn-gold {
  background-color: var(--gold-accent);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold-accent);
  transition: var(--transition);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.btn-gold:hover {
  background-color: var(--gold-hover);
  border-color: var(--gold-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* =========================================
   Page Header / Dark Banner (shared across pages)
   ========================================= */
.page-header {
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--brand-blue) 100%);
  color: #ffffff;
  padding: 3.5rem 0 3rem 0;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: rgba(197, 160, 89, 0.07);
  border-radius: 50%;
}

/* =========================================
   Hero Section
   ========================================= */
.hero-section {
  background: linear-gradient(135deg, #0f2942 0%, #1b365d 60%, #0a7a71 100%);
  color: #ffffff;
  padding: 5rem 0 6rem 0;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(197, 160, 89, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-section h1 {
  color: #ffffff;
  font-size: 3.4rem;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero-section p.lead {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 400;
  line-height: 1.75;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.3px;
}

.hero-avatar-wrapper {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-avatar {
  width: 340px;
  height: 340px;
  object-fit: cover;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  border: 5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  animation: morph 9s ease-in-out infinite;
}

@keyframes morph {
  0%   { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  50%  { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* Trust / Credential Metrics Banner */
.trust-metrics-section .metric-number {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.trust-metrics-section .metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

/* =========================================
   Cards & Components
   ========================================= */
.card-custom {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
}

.card-custom:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(27, 54, 93, 0.18);
}

.icon-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background-color: var(--teal-light);
  color: var(--teal-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

/* Ensure uniform card grid items */
.row.g-4 > [class*="col-"] {
  display: flex;
}

.row.g-4 > [class*="col-"] > .card-custom {
  flex: 1;
}

/* =========================================
   Timeline Components
   ========================================= */
.timeline-list {
  position: relative;
  padding-left: 2.5rem;
  border-left: 2px solid var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
  padding-bottom: 0.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.85rem;
  top: 0.35rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--brand-blue);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px var(--brand-blue);
}

.timeline-date {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

/* =========================================
   Blog / Editorial Styles
   ========================================= */
.blog-content-wrapper {
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.85;
  color: #334155;
}

.blog-content-wrapper p {
  margin-bottom: 1.5rem;
}

.blog-content-wrapper h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-content-wrapper h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-content-wrapper blockquote {
  border-left: 4px solid var(--gold-accent);
  background-color: var(--gold-light);
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--primary-navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Table of Contents */
.toc-box {
  background-color: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.toc-box h5 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.toc-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.toc-box li {
  margin-bottom: 0.35rem;
  font-size: 0.93rem;
}

/* =========================================
   Badges
   ========================================= */
.badge-category {
  background-color: var(--teal-light);
  color: var(--teal-accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  display: inline-block;
}

.badge-tag {
  background-color: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
  display: inline-block;
  transition: var(--transition);
}

.badge-tag:hover {
  background-color: var(--brand-blue);
  color: #ffffff;
}

/* =========================================
   Comments
   ========================================= */
.comment-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-author {
  font-weight: 700;
  color: var(--primary-navy);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =========================================
   Admin Panel
   ========================================= */
.admin-sidebar {
  min-height: 100vh;
  background-color: var(--primary-navy);
  color: #94a3b8;
}

.admin-sidebar .nav-link {
  color: #cbd5e1 !important;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.admin-sidebar .nav-link:hover, 
.admin-sidebar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.admin-stat-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.admin-stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary-navy);
}

/* =========================================
   Footer
   ========================================= */
footer {
  background-color: var(--primary-navy);
  color: #94a3b8;
  padding: 4rem 0 2rem 0;
  font-size: 0.9rem;
}

footer h5 {
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 1.25rem;
}

footer a {
  color: #94a3b8;
  transition: var(--transition);
}

footer a:hover {
  color: var(--gold-accent);
}

footer ul li {
  line-height: 1;
  margin-bottom: 0.6rem;
}

footer ul li a {
  display: inline-block;
  font-size: 0.88rem;
}

footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  margin-top: 3rem;
  color: #64748b;
  font-size: 0.85rem;
}

.bg-dark-subtle {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* =========================================
   Responsive Breakpoints
   ========================================= */

/* Large tablets and small desktops */
@media (max-width: 1199.98px) {
  .hero-section h1 { font-size: 2.9rem; }
  .hero-avatar { width: 300px; height: 300px; }
}

/* Tablets */
@media (max-width: 991.98px) {
  .hero-section {
    padding: 4rem 0 5rem 0;
    min-height: auto;
  }

  .hero-section h1 { font-size: 2.5rem; }

  .hero-avatar {
    width: 240px;
    height: 240px;
    margin: 2.5rem auto 0 auto;
    display: block;
  }

  .hero-section .col-lg-7 {
    text-align: center;
  }

  .hero-section .d-flex.flex-wrap {
    justify-content: center;
  }

  .trust-metrics-section .metric-number { font-size: 2rem; }
}

/* Mobile */
@media (max-width: 767.98px) {
  .hero-section {
    padding: 3rem 0 4rem 0;
    text-align: center;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p.lead {
    font-size: 1rem;
  }

  .hero-avatar {
    width: 200px;
    height: 200px;
  }

  .hero-badge {
    font-size: 0.75rem;
  }

  .trust-metrics-section .metric-number {
    font-size: 1.75rem;
  }

  .trust-metrics-section .metric-label {
    font-size: 0.72rem;
  }

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

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

  footer {
    padding: 3rem 0 1.5rem 0;
  }

  footer .row > div {
    margin-bottom: 1.5rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 575.98px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }

  .hero-avatar {
    width: 170px;
    height: 170px;
  }

  .btn-lg {
    padding: 0.6rem 1.1rem;
    font-size: 0.9rem;
  }

  .d-flex.gap-3 {
    gap: 0.75rem !important;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
