/* ==========================================================================
   Mehmet Şehirli Web Portal - Modern, High-Contrast Ultra-Premium Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Dark Modern Color Palette */
  --bg-color: #0b0f19;
  --panel-bg: rgba(15, 23, 42, 0.94);
  --panel-bg-hover: rgba(24, 35, 63, 0.98);
  --panel-solid: #0f172a;
  --panel-surface: #1e293b;
  --border-color: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(56, 189, 248, 0.45);
  
  /* Brand Accent Colors */
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.25);
  --accent-color: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  
  /* Text Colors with Ultra High Contrast */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Shadows & Depth */
  --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 20px 35px -5px rgba(0, 0, 0, 0.75), 0 0 20px rgba(2, 132, 199, 0.2);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-image: url('img/orta.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-secondary);
  font-family: var(--font-family);
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ==========================================================================
   Header & Navigation (Glassmorphism)
   ========================================================================== */
header {
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  gap: 12px;
  list-style: none;
  align-items: center;
}

.nav-link {
  font-weight: 700;
  color: #f8fafc !important;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.nav-link:hover {
  color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.95);
  border-color: #38bdf8;
}

.nav-link.active {
  color: #ffffff !important;
  background: var(--primary-color) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  text-align: center;
  margin-bottom: 0;
  background-color: #138fcb;
  background-image: linear-gradient(to bottom, #138fcb 0%, rgba(19, 143, 203, 0) 140px), url('img/dalgabg.png');
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  padding: 100px 24px 260px;
  width: 100%;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -1px;
  color: #ffffff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero p {
  color: #f1f5f9;
  font-size: 19px;
  font-weight: 400;
  max-width: 640px;
  margin: 0 auto;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.floating-wave {
  position: absolute;
  bottom: 150px;
  left: 0;
  width: 100%;
  height: 300px;
  background-image: url('img/dalga.png');
  background-size: cover;
  background-repeat: repeat-x;
  background-position: bottom center;
  z-index: 2;
  pointer-events: none;
  animation: wave-float 4s ease-in-out infinite;
}

@keyframes wave-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

/* ==========================================================================
   Page Layout & Container
   ========================================================================== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 10;
}

/* Sub-Hero Banners (Clean, No Border, No Shadow) */
.sub-hero-banner {
  margin-bottom: 36px;
  text-align: center;
  width: 100%;
}

.sub-hero-banner img {
  max-width: 100%;
  height: auto;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  display: inline-block;
}

/* ==========================================================================
   Posts Grid & Cards (Modern, Opaque, High Contrast)
   ========================================================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
  background: var(--panel-bg-hover);
}

.card-img-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #111827;
  overflow: hidden;
}

.card-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-category {
  color: var(--accent-color);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 12px;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  transition: var(--transition);
}

.card:hover .card-title {
  color: var(--accent-color);
}

.card-excerpt {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 14px;
  margin-top: auto;
}

.read-more:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* ==========================================================================
   Detail View Layout (Post Detail & About)
   ========================================================================== */
.detail-layout {
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 40px;
}

@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
}

.post-body {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .post-body {
    padding: 24px;
  }
}

.post-header-meta {
  margin-bottom: 24px;
}

.post-title-main {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.post-date-main {
  color: var(--text-muted);
  font-size: 14px;
}

.post-image-main {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.post-rich-content {
  font-size: 17px;
  line-height: 1.85;
  color: #e2e8f0;
}

.post-rich-content p {
  margin-bottom: 24px;
  color: #e2e8f0;
}

.post-rich-content h1,
.post-rich-content h2,
.post-rich-content h3,
.post-rich-content h4 {
  color: #ffffff;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
}

.post-rich-content h2 {
  font-size: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.post-rich-content h3 {
  font-size: 20px;
}

.post-rich-content ul,
.post-rich-content ol {
  margin-left: 24px;
  margin-bottom: 24px;
}

.post-rich-content li {
  margin-bottom: 8px;
  color: #e2e8f0;
}

.post-rich-content a {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-rich-content a:hover {
  color: #ffffff;
}

.post-rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 20px 0;
  border: 1px solid var(--border-color);
}

.post-rich-content blockquote {
  border-left: 4px solid var(--primary-color);
  background: rgba(2, 132, 199, 0.08);
  padding: 16px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: #cbd5e1;
  margin: 24px 0;
}

.post-rich-content pre,
.post-rich-content code {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

.post-rich-content code {
  padding: 2px 6px;
  font-size: 14px;
}

.post-rich-content pre {
  padding: 18px;
  overflow-x: auto;
  margin: 24px 0;
  line-height: 1.5;
}

.post-rich-content pre code {
  padding: 0;
  background: transparent;
  border: none;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.widget {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.widget-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.widget-item a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  transition: var(--transition);
}

.widget-item a:hover {
  color: #ffffff;
  transform: translateX(4px);
}

.widget-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-color);
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================================
   Comments Section
   ========================================================================== */
.comments-container {
  margin-top: 40px;
}

.comment-card {
  background: var(--panel-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 700;
  color: #ffffff;
}

.comment-text {
  font-size: 15px;
  color: #e2e8f0;
  line-height: 1.6;
}

/* ==========================================================================
   Forms & Controls
   ========================================================================== */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

input,
textarea,
select {
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #ffffff;
  font-family: var(--font-family);
  font-size: 15px;
  outline: none;
  transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #0d1322;
}

.btn {
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px 0 rgba(2, 132, 199, 0.35);
  transition: var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(2, 132, 199, 0.5);
  color: #ffffff;
}

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

/* Filter bar & Search */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.search-form {
  flex-direction: row;
  margin-top: 0;
  display: flex;
}

.search-input {
  width: 260px;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.search-btn {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0 18px;
}

/* ==========================================================================
   Course Panel & LMS Component Styles (courses.php)
   ========================================================================== */
.panel-card,
.syllabus-card,
.course-card {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  margin-bottom: 24px;
}

.module-card {
  background: var(--panel-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.module-card:hover {
  border-color: var(--border-hover);
}

.module-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.content-item {
  background: rgba(9, 13, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.content-item:hover {
  background: rgba(9, 13, 22, 0.9);
  border-color: var(--accent-color);
}

/* Progress bar */
.progress-bar-bg {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  background: var(--accent-gradient);
  height: 100%;
  border-radius: 20px;
  transition: width 0.5s ease;
}

/* Social buttons */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.social-button {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.social-button:hover {
  border-color: var(--accent-color);
  transform: translateY(-3px);
  background: var(--panel-bg-hover);
  box-shadow: var(--card-shadow-hover);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.page-link {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  color: var(--text-secondary);
  box-shadow: var(--card-shadow);
  transition: var(--transition);
}

.page-link:hover,
.page-link.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Alerts */
.alert {
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-weight: 600;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
}

/* ==========================================================================
   Contact Drawer (Smooth Slide Down)
   ========================================================================== */
.contact-drawer-panel {
  background-image: url('img/ust.jpg');
  background-size: cover;
  background-position: center;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease;
  box-sizing: border-box;
  padding: 0 40px;
  position: relative;
}

.contact-drawer-panel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(19, 143, 203, 0) 0%, #138fcb 100%);
  pointer-events: none;
  z-index: 1;
}

.contact-drawer-panel.open {
  max-height: 550px;
  padding: 50px 40px;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .contact-drawer-panel.open {
    padding: 30px 20px;
    max-height: 850px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border-color);
  background: rgba(9, 13, 22, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 60px;
}

footer a {
  color: var(--accent-color);
  font-weight: 500;
}

footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}