/* — RESET & BOX-SIZING — */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* — COCOA PEARL PALETTE — */
:root {
  --cp-dark:  #402E2A;
  --cp-mid:   #947C70;
  --cp-light: #EDE3DB;
}

/* — BODY & GLOBAL — */
body {
  font-family: Arial, sans-serif;
  background-color: #ffffff; /* changed from gradient to white */
  color: var(--cp-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: padding-left 0.4s;
}

/* — SIDEBAR — */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 72px;
  height: 100vh;
  background: var(--cp-mid);
  overflow: hidden;
  transition: width 0.4s;
  z-index: 1000;
}
body.open .sidebar {
  width: 260px;
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* — SIDEBAR HEADER — */
.sidebar-header {
  display: flex;
  align-items: center;
  height: 72px;
  padding: 0 1rem;
  background: rgba(0,0,0,0.07);
  position: relative;
}

/* SIDEBAR BURGER/CLOSE BUTTON */
.sidebar-burger {
  width: 72px;
  height: 72px;
  background: url('assets/icon-burger.svg') no-repeat center;
  background-size: 36px 36px;
  border: none;
  cursor: pointer;
  display: block;
  font-size: 0;
  color: transparent;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1001;
  outline: none;
  transition: background 0.3s;
}
body.open .sidebar-burger {
  background: url('assets/icon-close.svg') no-repeat center;
  background-size: 36px 36px;
}
.sidebar-burger::after { display: none !important; content: ""; }

.sidebar-logo {
  flex: 1;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--cp-light);
  opacity: 0;
  transition: opacity 0.3s;
  margin-left: 80px;
}
body.open .sidebar-logo {
  opacity: 1;
}

/* — NAV ITEMS — */
.sidebar-nav,
.sidebar-footer {
  display: flex;
  flex-direction: column;
}
.sidebar-nav { margin-top: 1rem; }
.sidebar-footer { margin-top: auto; }
.sidebar-item {
  display: flex;
  align-items: center;
  padding: 12px 1.5rem;
  color: var(--cp-light);
  text-decoration: none;
  gap: 1rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  transition: background 0.2s;
}
.sidebar-item img {
  width: 24px; height: 24px;
}
.sidebar-item span {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s, transform 0.3s;
}
body.open .sidebar-item span {
  opacity: 1;
  transform: translateX(0);
}
.sidebar-item:hover {
  background: var(--cp-dark);
}

/* — MAIN CONTENT — */
.main {
  margin-left: 72px;
  flex: 1;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.4s;
  min-height: 100vh;
}
body.open .main {
  margin-left: 260px;
}

/* — MAIN HEADER — */
.main-header {
  background: transparent !important;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: none !important;
  border-bottom: none !important;
}
.header-logo,
.main-header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #402E2A !important;  /* dark text for white background */
}
.main-header .nav {
  display: flex;
  gap: 30px;
}
.main-header .nav a,
.main-header .nav a:visited,
.main-header .nav a.active {
  color: #402E2A !important;
  text-decoration: none !important;
  font-weight: bold;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}
.main-header .nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 2px;
  background: #402E2A !important;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s;
}
.main-header .nav a.active::after,
.main-header .nav a:hover::after {
  transform: scaleX(1);
}
.main-header .nav a:hover {
  color: #947C70;
}

/* — CONTAINER — */
.container {
  max-width: 1280px;
  margin: 40px auto 0;
  padding: 0 20px;
  flex: 1;
  margin-bottom: 32px;
  background: #ffffff;
}
h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--cp-dark);
}

/* — BLOG GRID — */
.grid {
  display: grid;
  grid-gap: 30px;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3,1fr); }
}
@media (min-width: 768px) and (max-width:1023px) {
  .grid { grid-template-columns: repeat(2,1fr); gap:20px; }
}
@media (max-width:767px) {
  .grid { grid-template-columns:1fr; gap:15px; }
}

/* — CARD — */
.card {
  background: var(--cp-light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s;
  color: var(--cp-dark);
  border: 1px solid var(--cp-mid);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.card:hover { transform: translateY(-3px); }
.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}
.card-content { 
  padding: 15px; 
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-title {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #282427;
}
.card-date {
  font-size: 0.85rem;
  color: var(--cp-dark);
  margin-bottom: 8px;
}
.card-content p { color: var(--cp-dark); }

/* — CARD LINKS — */
.card-link,
.card-link a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.card-link:hover .card { transform: translateY(-3px); }

/* — FOOTER — */
.main-footer {
  background: #000;
  color: var(--cp-light);
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  margin-left: 72px;
  width: calc(100vw - 72px);
  border-radius: 0;
  overflow-x: hidden;
  position: relative;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.main-footer a {
  color: var(--cp-light);
  text-decoration: none;
  font-size: 0.95rem;
}
.main-footer p {
  font-size: 0.9rem;
}

/* — PAGINATION — */
.pagination {
  text-align: center;
  margin: 40px 0;
  font-family: Arial, sans-serif;
}
.pagination a {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 14px;
  background: var(--cp-mid);
  color: var(--cp-dark);
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
  font-size: 0.9rem;
}
.pagination a:hover {
  background: var(--cp-light);
  color: var(--cp-dark);
}
.pagination a.active {
  background: var(--cp-dark);
  color: var(--cp-light);
  cursor: default;
}
.pagination a.prev,
.pagination a.next {
  background: var(--cp-light);
  color: var(--cp-dark);
}
.pagination a.prev:hover,
.pagination a.next:hover {
  background: var(--cp-mid);
  color: var(--cp-dark);
}

/* — RESPONSIVE SIDEBAR ON MOBILE — */
@media (max-width: 768px) {
  .sidebar, .main { margin-left: 0 !important; }
  .sidebar { width: 0; }
  body.open .sidebar { width: 220px; }
  body.open .main { margin-left: 220px; }
}

/* — HEADINGS & SPACING — */
.container h1,
.container h2:first-child {
  margin-top: 32px !important;
}
.container .intro,
.container > p {
  margin-top: 18px !important;
  margin-bottom: 22px !important;
}
.container h1,
.container h2,
.container .intro,
.container > p {
  color: #402E2A !important;
  text-shadow: 0 1px 6px #EDE3DB50, 0 0 1px #947C70;
}
@media (max-width: 600px) {
  .container h1,
  .container h2 {
    font-size: 1.3rem !important;
    line-height: 1.18 !important;
  }
  .container .intro,
  .container > p {
    font-size: 1rem !important;
  }
}

/* Header nav tweaks */
.main-header .nav {
  display: flex;
  gap: 38px;
  align-items: center;
}
.main-header .nav a,
.main-header .nav a:visited,
.main-header .nav a.active {
  color: #402E2A !important;
  font-size: 1.14rem !important;
  font-weight: bold;
  padding: 2px 12px !important;
  text-decoration: none !important;
}

/* Account icon sizing */
.main-header .account-icon img,
.nav .account-icon img {
  width: 32px !important;
  height: 32px !important;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  margin-bottom: -4px;
}

/* Fade-in logo */
.fade-logo {
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeOutLogo 1.5s ease-out forwards;
  animation-delay: 0.3s;
}
@keyframes fadeOutLogo {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.header-logo {
  text-decoration: none;
  color: inherit;
}
.header-logo:hover {
  text-decoration: none;
}
