/* ==========================================
   PHASE 2 - ADVANCED HOMEPAGE LAYOUTS
========================================== */

.homepage-inner[data-layout="classic"] {
  max-width: 100%;
}

.homepage-inner[data-layout="columns"] #customHomepageSections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.homepage-inner[data-layout="compact"] {
  padding: 12px;
}

.homepage-inner[data-layout="compact"] .cc-custom-home-section {
  padding: 9px;
  margin-top: 9px !important;
}

.cc-custom-home-section {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 2px solid;
  border-color: #fff #777 #777 #fff;
  box-shadow: 2px 2px 0 #aaa;
  overflow-wrap: anywhere;
}

.cc-custom-home-section h2 {
  font-family: Georgia, serif;
  font-size: 17px;
  margin: 0 0 10px;
  border-bottom: 1px dotted #aaa;
  padding-bottom: 8px;
}

.cc-custom-home-section p {
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
}

#customHomepageSections {
  display: grid;
  gap: 0;
}

#customHomepageLinks {
  margin-top: 16px;
}

.homepage-inner[data-pattern="solid"] {
  background-repeat: no-repeat;
}

@media(max-width: 650px) {
  .homepage-inner[data-layout="columns"] #customHomepageSections {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   PHASE 3 - PERSONAL CONTENT SYSTEM
========================================== */

.cc-content-section {
  margin-top: 20px;
}

.cc-content-subheading {
  color: #000080;
  font: bold 14px Georgia, serif;
  margin: 16px 0 7px;
}

.cc-content-empty {
  padding: 18px;
  text-align: center;
  background: #f1f0e9;
  border: 1px dashed #aaa;
  color: #666;
  font-size: 12px;
}

.cc-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
}

.cc-gallery-card {
  min-width: 0;
  padding: 8px;
  background: #e7e5dc;
  border: 2px outset white;
}

.cc-gallery-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #ccc;
  border: 1px solid #777;
}

.cc-gallery-caption {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.cc-blog-post {
  margin: 12px;
  padding: 15px;
  background: #fff;
  border: 2px solid;
  border-color: #fff #777 #777 #fff;
}

.cc-blog-title {
  color: #000080;
  font: bold 19px Georgia, serif;
  margin: 0 0 6px;
}

.cc-blog-date {
  display: block;
  color: #777;
  margin-bottom: 12px;
}

.cc-blog-content {
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.cc-blog-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.cc-content-edit,
.cc-content-delete {
  padding: 6px 10px;
  border: 2px outset white;
  background: #c0c0c0;
  cursor: pointer;
  font-size: 11px;
}

.cc-content-delete {
  color: #900;
}

.cc-update-list {
  display: grid;
  gap: 10px;
}

.cc-update-item {
  padding: 11px;
  background: #f1f0e9;
  border-left: 4px solid #000080;
}

.cc-update-item strong {
  color: #000080;
  font-size: 12px;
}

.cc-update-item p {
  font-size: 12px;
  margin: 5px 0;
}

.cc-update-item small {
  font-size: 10px;
  color: #777;
}


/* CONTENT MANAGER */

.cc-content-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #0009;
  display: grid;
  place-items: center;
  padding: 12px;
}

.cc-content-modal-window {
  width: min(650px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 16px;
  background: #c0c0c0;
  border: 3px outset white;
  box-shadow: 6px 6px #0006;
  display: grid;
  gap: 10px;
}

.cc-content-modal-window h2 {
  color: #000080;
  margin: 0;
  font: bold 18px Tahoma, Arial;
}

.cc-content-modal-window h3 {
  margin: 12px 0 2px;
  color: #000080;
  font: bold 14px Tahoma, Arial;
  border-bottom: 1px solid #888;
  padding-bottom: 6px;
}

.cc-content-modal-window input,
.cc-content-modal-window textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 9px;
  background: white;
  border: 2px inset white;
  color: #111;
  font: 12px Tahoma, Arial;
}

.cc-content-modal-window textarea {
  resize: vertical;
}

.cc-content-modal-window button {
  justify-self: start;
}

.cc-content-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px;
  margin: -16px -16px 8px;
  background: #000080;
  color: white;
  font-weight: bold;
}

.cc-content-close {
  padding: 3px 9px;
  background: #c0c0c0;
  border: 2px outset white;
  cursor: pointer;
}

.cc-content-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cc-content-note {
  font-size: 11px;
  color: #555;
}

@media(max-width: 650px) {
  .cc-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media(max-width: 400px) {
  .cc-gallery-grid {
    grid-template-columns: 1fr;
  }

  .cc-gallery-card img {
    height: 190px;
  }
}