:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #111827;
  --text: #1d2a3b;
  --muted: #707b8c;
  --border: #e7e7e7;
  --nav-bg: #0E53B5;
  --shadow: rgba(15, 23, 42, 0.12);
}

body.dark {
  --bg: #07111f;
  --surface: #0f172a;
  --surface-2: #111827;
  --text: #edf4ff;
  --muted: #cbd5e1;
  --border: #1f2937;
  --nav-bg: #08111f;
  --shadow: rgba(15, 23, 42, 0.45);
}

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

body {
  font-family: Arial, sans-serif;
  padding-top: 72px;
  background: var(--bg);
  color: var(--text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

body.home-page {
  padding-top: 155px;
}

.site-scroll-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.site-scroll-header.header-hidden {
  transform: translateY(-100%);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
}

.sidebar-overlay.active {
  display: block;
}

.nav-profile-link {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.nav-profile-link:hover {
  opacity: 0.85;
  text-decoration: underline;
}

/* NAVBAR */

.sidebar-login {
  margin-top: 30px;
}

.login-btn {
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: #0E53B5;
  color: white;

  font-size: 18px;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  transition: 0.3s;
}

.login-btn:hover {
  background: #083a7a;
}

.custom-navbar {
  width: 100%;
  background-color: var(--nav-bg);
  padding: 18px 120px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LOGO */

.logo {
  color: white;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
}

/* RIGHT ICONS */

.nav-icons {
  display: flex;
  align-items: center;
  gap: 25px;
}

/* ICON BOX */

.icon-box {
  position: relative;
  cursor: pointer;
}

.icon-box i {
  font-size: 22px;
  color: white;
}

/* RED BADGE */

.count-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  width: 20px;
  height: 20px;
  background-color: red;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
}

.nav-username {
  color: white;
  font-size: 15px;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-panel-btn {
  background: #1e293b;
  color: #f8fafc;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: 0.2s;
}

.admin-panel-btn:hover {
  background: #0f172a;
  color: white;
}

.nav-logout-form {
  display: inline;
}

.nav-logout-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: white;
  font-size: 22px;
  padding: 0;
}

.sidebar-username {
  color: white;
  font-weight: 600;
  padding: 10px 0;
  display: block;
}

/* SIDEBAR SECTION (DİL) */
.sidebar-section {
  margin-top: 25px;
}

.sidebar-section h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: #0E53B5;
}

.sidebar-select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  outline: none;
}

/* SIDEBAR FULL HEIGHT */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Hide sidebar-theme container on larger screens; show only on mobile */
.sidebar-theme {
  display: none;
}

/* TOP FIXED */
.sidebar-top {
  flex-shrink: 0;
}

/* SCROLLABLE AREA */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}

/* SCROLL BAR BEAUTY (optional) */
.sidebar-content::-webkit-scrollbar {
  width: 5px;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: #0E53B5;
  border-radius: 10px;
}

/* MOBILE ACTION BUTTONS */
.sidebar-user-actions {
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* LOGIN BUTTON */

#Salam {
  width: 45px;
  height: 45px;
  background-color: rgba(2, 40, 74, 0.7);
  border-radius: 12px;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: 0.3s;
}

#Salam:hover {
  background-color: rgba(1, 27, 50, 0.9);
}

#Salam i {
  font-size: 18px;
}

/* LEFT NAVBAR */

.left-navbar {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* HAMBURGER */

.hamburger-btn {
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.hamburger-btn:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* SIDEBAR */

.theme-toggle-btn {
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: white;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sidebar-menu {
  position: fixed;
  top: 0;
  left: -320px;

  width: 320px;
  height: 100vh;

  background: var(--surface);
  color: var(--text);

  z-index: 9999;

  transition: 0.4s;

  padding: 25px;
}

.sidebar-menu.active {
  left: 0;
}

/* TOP */

.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 40px;
}

.sidebar-top h2 {
  color: #0E53B5;
  font-size: 30px;
  font-weight: bold;
}

body.dark .sidebar-top h2 {
  color: #fff;
}

.close-sidebar {
  border: none;
  background: none;
  font-size: 28px;
  cursor: pointer;
}

body.dark .close-sidebar,
body.dark .sidebar-contact,
body.dark .sidebar-contact i,
body.dark .sidebar-section h4 {
  color: #fff;
}

/* LINKS */

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-links i {
  color: #0E53B5;
  font-size: 22px;
}

body.dark .sidebar-links i,
body.dark .sidebar-socials a i {
  color: #fff;
}

.sidebar-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
  transition: 0.3s;
}

.sidebar-links a:hover {
  color: #0E53B5;
  padding-left: 5px;
}

/* SOCIALS */

.sidebar-socials {
  margin-top: 40px;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-socials a {
  text-decoration: none;
  color: var(--muted);
  font-size: 18px;

  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-socials a i {
  color: #0E53B5;
  font-size: 20px;
}

/* CONTACT */

.sidebar-contact {
  margin-top: 24px;
  font-size: 22px;
  color: #0E53B5;
  font-weight: bold;
}

/* OVERLAY */

.sidebar-overlay {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.45);

  opacity: 0;
  visibility: hidden;

  transition: 0.3s;

  z-index: 9998;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* NAV LEFT */

.nav-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* HAMBURGER */

.hamburger-btn {
  width: 45px;
  height: 45px;

  border: none;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.15);
  color: white;

  font-size: 28px;
  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  transition: 0.3s;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* SIDEBAR */

.mobile-sidebar {
  position: fixed;

  top: 0;
  left: -320px;

  width: 320px;
  height: 100vh;

  background: white;

  z-index: 9999;

  transition: 0.3s;

  padding: 25px;

  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-sidebar.active {
  left: 0;
}

/* TOP */

.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 30px;
}

.sidebar-top h2 {
  color: #0E53B5;
  font-size: 28px;
  margin: 0;
}

/* CLOSE */

.close-sidebar {
  border: none;
  background: none;

  font-size: 24px;
  cursor: pointer;
}

/* LINKS */

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-links a {
  text-decoration: none;
  color: var(--text);

  font-size: 18px;
  font-weight: 500;

  display: flex;
  align-items: center;
  gap: 12px;
}

/* MOBILE */

@media (min-width: 992px) {
  .mobile-sidebar {
    display: none !important;
  }
}



/* =========================
   RESPONSIVE
========================= */

/* LAPTOP */

@media (max-width: 1200px) {

  .custom-navbar {
    padding: 18px 50px;
  }

}

/* TABLET */

@media (max-width: 992px) {

  .custom-navbar {
    padding: 16px 30px;
  }

  .logo {
    font-size: 26px;
  }

  .nav-icons {
    gap: 18px;
  }

}

/* MOBILE */

@media (max-width: 768px) {

  body {
    padding-top: 64px;
  }

  body.home-page {
    padding-top: 145px;
  }

  .custom-navbar {
    padding: 14px 18px;
    position: relative;
  }

  .nav-left {
    flex: 1;
    justify-content: center;
    position: relative;
  }

  .hamburger-btn {
    position: absolute;
    left: 0;
  }

  .logo {
    font-size: 24px;
    margin: 0 auto;
  }

  .nav-icons {
    display: none;
  }

  /* sidebar */

  .mobile-sidebar,
  .sidebar-menu {
    width: 280px;
    padding: 20px;
  }

  .sidebar-top h2 {
    font-size: 24px;
  }

  .sidebar-links a {
    font-size: 17px;
  }

  .sidebar-socials a {
    font-size: 16px;
  }

  .sidebar-contact {
    font-size: 18px;
  }

  .hamburger-btn {
    width: 42px;
    height: 42px;
    font-size: 24px;
  }

}

/* SMALL MOBILE */

@media (max-width: 480px) {

  .custom-navbar {
    padding: 12px 14px;
  }

  .logo {
    font-size: 21px;
  }

  .nav-left {
    gap: 12px;
  }

  .hamburger-btn {
    width: 38px;
    height: 38px;
    font-size: 21px;
    border-radius: 10px;
  }

  .mobile-sidebar,
  .sidebar-menu {
    width: 240px;
    padding: 18px;
  }

  .sidebar-links {
    gap: 16px;
  }

  .sidebar-links a {
    font-size: 15px;
  }

  .sidebar-socials {
    gap: 14px;
  }

  .sidebar-socials a {
    font-size: 14px;
  }

  .sidebar-contact {
    font-size: 16px;
  }

}

/* =========================
   MOBILE SIDEBAR ACTIONS
========================= */

.sidebar-user-actions {
  display: none;
}

@media (max-width: 768px) {

  .nav-icons {
    display: none;
    /* PC iconları gizlənir */
  }

  .sidebar-user-actions {
    margin-top: 10px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .login-btn {
    width: 100%;
    height: 45px;
    border: none;
    border-radius: 10px;
    background: #0E53B5;
    color: white;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    font-size: 16px;
    cursor: pointer;
  }

  .login-btn:hover {
    background: #083a7a;
  }

@media (max-width: 768px) {
  /* Ensure theme button is visible in mobile sidebar */
  .sidebar-theme {
    display: block;
    margin-top: 10px;
  }
  .sidebar-theme-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 45px;
    border-radius: 10px;
    background: #0E53B5 !important;
    color: white;
    padding: 0 12px;
    font-size: 16px;
    cursor: pointer;
    justify-content: flex-start;
  }

  /* Force icon/color to remain visible on light theme */
  .sidebar-theme-btn i {
    color: #fff !important;
  }

  .sidebar-theme-btn {
    border: none;
  }

  body.dark .sidebar-theme-btn {
    background: #083a7a;
    color: white;
  }

}

}


/* =========================
   SIDEBAR FOOTER
========================= */

.sidebar-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.copyright {
  background: linear-gradient(135deg, #0E53B5, #1d72f3);
  padding: 15px;
  border-radius: 14px;
  color: #fff;
  text-align: center;

  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.copyright strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.copyright p {
  font-size: 13px;
  margin: 0;
  opacity: 0.9;
}

.copyright span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.8;
}

/* hover effect */
.copyright:hover {
  transform: translateY(-2px);
  transition: 0.3s;
}

/* responsive */
@media (max-width: 768px) {
  .copyright {
    font-size: 12px;
    padding: 12px;
  }
}

