/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Poppins:wght@700;900&display=swap');

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #D3D0CB;
  color: #2E5266;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(135deg, #2E5266, #6E8898);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  z-index: 1100;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 6px 15px rgba(46, 82, 102, 0.3);
  font-weight: 700;
  letter-spacing: 0.08em;
  user-select: none;
  transition: background 0.4s ease;
}

.navbar a,
.dropbtn {
  color: #E2C044;
  background: none;
  border: none;
  padding: 0.5rem 1.1rem;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.25s ease, color 0.3s ease, box-shadow 0.25s ease;
  box-shadow: 0 0 transparent;
}

.navbar a:hover,
.dropbtn:hover,
.navbar a:focus,
.dropbtn:focus {
  background-color: #9FB1BC;
  color: #2E5266;
  box-shadow: 0 4px 12px rgba(111, 136, 152, 0.5);
  outline: none;
}

/* Dropdown */
.dropdown {
  position: relative;
  margin-left: 1.25rem;
  user-select: none;
}

.dropdown-content {
  position: absolute;
  top: 60px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(111, 136, 152, 0.3);
  display: none;
  flex-direction: column;
  min-width: 200px;
  z-index: 1200;
  padding: 0.25rem 0;
  transition: opacity 0.3s ease;
}

.dropdown-content a {
  color: #2E5266;
  padding: 0.85rem 1.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.25s ease;
  border-radius: 8px;
}

.dropdown-content a:hover,
.dropdown-content a:focus {
  background-color: #D3D0CB;
  outline: none;
  cursor: pointer;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
  display: flex;
  opacity: 1;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 260px;
  background-color: #2E5266;
  color: #D3D0CB;
  padding-top: 1.2rem;
  overflow-y: auto;
  box-shadow: 2px 0 12px rgba(46, 82, 102, 0.25);
  transition: background-color 0.3s ease;
  border-radius: 0 12px 12px 0;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.sidebar-menu a {
  display: block;
  padding: 0.9rem 1.6rem;
  color: #D3D0CB;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease, color 0.3s ease;
  letter-spacing: 0.03em;
}

.sidebar-menu a:hover,
.sidebar-menu a:focus {
  background-color: #6E8898;
  color: #fff;
  box-shadow: 0 4px 10px rgba(46, 82, 102, 0.5);
  outline: none;
}

/* Main content */
.content {
  margin-top: 60px;
  margin-left: 260px;
  padding: 2.25rem 2.5rem;
  flex-grow: 1;
  max-width: 900px;
  transition: margin-left 0.3s ease;
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.6;
  color: #2E5266;
}

/* Titles and headings */
.content h1 {
  font-family: 'Poppins', sans-serif;
  font-weight: 900;
  font-size: 3.2rem;
  letter-spacing: 0.06em;
  color: #2E5266;
  margin-bottom: 1.6rem;
  cursor: default;
  user-select: none;
  transition: color 0.3s ease;
}

.content h1:hover {
  color: #E2C044;
}

h2 {
  font-family: 'Merriweather', serif;
  color: #2E5266;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.03em;
  margin-bottom: 1.3rem;
}

h3 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: #6E8898;
  margin-bottom: 1rem;
}

h4, h5, h6 {
  font-family: 'Merriweather', serif;
  font-weight: 600;
  font-size: 1.3rem;
  color: #9FB1BC;
  margin-bottom: 0.8rem;
}

/* Paragraph styling */
.content p {
  background-color: #f2f1ef;
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.7rem;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgba(46, 82, 102, 0.12);
  color: #2E5266;
  max-width: 850px;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.3s ease, box-shadow 0.3s ease;
}

.content p:hover {
  color: #6E8898;
  box-shadow: 0 6px 18px rgba(46, 82, 102, 0.25);
  cursor: default;
}

/* Links */
a {
  color: #E2C044;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #E2C044;
  transition: width 0.3s ease;
  border-radius: 3px;
}

a:hover,
a:focus {
  color: #9FB1BC;
  outline: none;
}

a:hover::after,
a:focus::after {
  width: 100%;
}

/* Buttons */
.navlink, .dropbtn, .sidebar-toggle, .sidebar-menu button.submenu-toggle {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 8px rgba(111, 136, 152, 0.25);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
  user-select: none;
}

.navlink:hover, .dropbtn:hover, .navlink:focus, .dropbtn:focus,
.sidebar-toggle:hover, .sidebar-toggle:focus,
.sidebar-menu button.submenu-toggle:hover,
.sidebar-menu button.submenu-toggle:focus {
  box-shadow: 0 6px 14px rgba(111, 136, 152, 0.5);
  background-color: #E2C044;
  color: #2E5266;
  transform: translateY(-2.5px);
  outline: none;
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: #1f3a47;
  border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #6E8898;
  border-radius: 10px;
  border: 2px solid #1f3a47;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }

  .content {
    margin-left: 0;
    padding: 1.5rem 1.75rem;
  }

  .dropdown-content {
    position: relative;
    top: 0;
    box-shadow: 0 4px 12px rgba(111, 136, 152, 0.15);
    border-radius: 10px;
  }

  .content p {
    font-size: 1rem;
  }

  h1, h2, h3 {
    font-size: 1.5rem;
  }
}
