/* ========================================
   Dr. Erkan Erdoğan Website - Custom Styles
   Bootstrap 5 Compatible
   ======================================== */

/* ========== ROOT VARIABLES ========== */
:root {
  --bs-primary: #0d6efd;
  --bs-primary-rgb: 13, 110, 253;
  --navbar-height: 76px;
}

/* ========== GLOBAL STYLES ========== */
* {
  box-sizing: border-box;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--navbar-height);
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: #fff !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-primary) !important;
}

.nav-link {
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  color: #333 !important;
  transition: color 0.2s ease-in-out;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--bs-primary) !important;
}

.nav-link.active {
  color: var(--bs-primary) !important;
  font-weight: 600;
}

/* Language Dropdown */
.navbar .dropdown-toggle {
  border: 1px solid #dee2e6;
  background-color: #fff;
  color: #495057;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
}

.navbar .dropdown-toggle:hover {
  background-color: #f8f9fa;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}

.navbar .dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  border-color: var(--bs-primary);
}

.navbar .dropdown-menu {
  position: absolute !important;
  z-index: 1050 !important;
  border: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden !important;
}

.navbar .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #495057;
  transition: all 0.2s ease-in-out;
}

.navbar .dropdown-item:hover {
  background-color: #f8f9fa;
  color: var(--bs-primary);
}

.navbar .dropdown-item i {
  width: 16px;
  text-align: center;
}

/* ========== HERO SECTION ========== */
.hero-section {
  background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
  min-height: 60vh;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.hero-image {
  opacity: 0.8;
}

/* ========== BUTTONS ========== */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-lg {
  padding: 0.75rem 2rem;
  font-size: 1.125rem;
}

/* ========== CARDS ========== */
.card {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 0.75rem;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.card-img-top {
  border-radius: 0;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.card-title a:hover {
  color: var(--bs-primary);
}

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

/* ========== FEATURES SECTION ========== */
.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--bs-primary);
  color: white;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: all 0.3s ease-in-out;
}

.feature-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 16px rgba(13, 110, 253, 0.3);
}

/* ========== CONTENT STYLING ========== */
.content-rich {
  line-height: 1.8;
  color: #333;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.content-rich h1,
.content-rich h2,
.content-rich h3,
.content-rich h4,
.content-rich h5,
.content-rich h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  font-weight: 600;
  line-height: 1.3;
}

.content-rich h1 { font-size: 2.5rem; }
.content-rich h2 { font-size: 2rem; }
.content-rich h3 { font-size: 1.75rem; }
.content-rich h4 { font-size: 1.5rem; }
.content-rich h5 { font-size: 1.25rem; }
.content-rich h6 { font-size: 1.125rem; }

.content-rich p {
  margin-bottom: 1.25rem;
}

.content-rich ul,
.content-rich ol {
  margin-bottom: 1.25rem;
  padding-left: 2rem;
}

.content-rich li {
  margin-bottom: 0.5rem;
}

.content-rich blockquote {
  border-left: 4px solid var(--bs-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6c757d;
}

.content-rich img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  margin: 1.5rem 0;
}

.content-rich a {
  color: var(--bs-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease-in-out;
}

.content-rich a:hover {
  border-bottom-color: var(--bs-primary);
}

.content-rich code {
  background-color: #f8f9fa;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #e83e8c;
}

.content-rich pre {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.content-rich pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.content-rich table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.content-rich table th,
.content-rich table td {
  border: 1px solid #dee2e6;
  padding: 0.75rem;
  text-align: left;
}

.content-rich table th {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* ========== FOOTER ========== */
footer {
  background: linear-gradient(135deg, #212529 0%, #343a40 100%);
  color: #fff;
}

footer a {
  color: #adb5bd;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

footer a:hover {
  color: var(--bs-primary);
}

/* ========== ALERTS ========== */
.alert {
  border: none;
  border-radius: 0.5rem;
  padding: 1rem 1.5rem;
}

/* ========== BADGES ========== */
.badge {
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

/* ========== FORMS ========== */
.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* ========== TABLES ========== */
.table-hover tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
  body {
    padding-top: var(--navbar-height);
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
  }
  
  .nav-link {
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f8f9fa;
  }
  
  .nav-link:last-child {
    border-bottom: none;
  }
  
  .navbar .dropdown {
    margin-top: 1rem;
  }
  
  .navbar .dropdown-toggle {
    width: 100%;
    text-align: center;
  }
  
  .navbar .dropdown-menu {
    width: 100%;
  }
  
  .hero-section {
    min-height: 50vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
    text-align: center;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
  
  .hero-section .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 767.98px) {
  .card-body {
    padding: 1.25rem;
  }
  
  .content-rich h1 { font-size: 1.75rem; }
  .content-rich h2 { font-size: 1.5rem; }
  .content-rich h3 { font-size: 1.25rem; }
  .content-rich h4 { font-size: 1.125rem; }
  .content-rich h5 { font-size: 1rem; }
  .content-rich h6 { font-size: 0.875rem; }
  
  /* Center posts on mobile */
  #posts .row > div[class*="col-"] {
    display: flex;
    justify-content: center;
  }
  
  #posts .row > div[class*="col-"] .card {
    width: 100%;
    max-width: 450px;
  }
}

@media (max-width: 575.98px) {
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .btn-lg {
    font-size: 1rem;
    padding: 0.625rem 1.5rem;
  }
  
  /* Additional centering for very small screens */
  #posts .row {
    justify-content: center;
  }
  
  #posts .row > div[class*="col-"] {
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* ========== UTILITIES ========== */
.shadow-hover:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
}

.transition-all {
  transition: all 0.3s ease-in-out;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ========== PRINT STYLES ========== */
@media print {
  .navbar,
  .btn,
  .dropdown,
  footer {
    display: none !important;
  }
  
  body {
    padding-top: 0;
  }
  
  .hero-section {
    background: none !important;
    color: #000 !important;
  }
}