/*
Theme Name: ColoringBay
Theme URI:
Description:
Author:
Author URI:
Version: 0.1
*/

:root {
  --bg-main: #f9f9fb;
  --bg-card: #ffffff;
  --bg-header: #ffffff;
  --bg-footer: #09090b;
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #71717a;
  --text-on-dark: #f4f4f5;
  
  --border-light: #e4e4e7;
  --border-medium: #a1a1aa;
  --border-dark: #27272a;
  
  --cta-pdf-bg: #000000;
  --cta-pdf-text: #ffffff;
  --cta-pdf-hover: #27272a;
  
  --cta-jpg-bg: #ffffff;
  --cta-jpg-border: #27272a;
  --cta-jpg-text: #27272a;
  --cta-jpg-hover: #f4f4f5;
  
  --cta-print-bg: #f4f4f5;
  --cta-print-text: #18181b;
  --cta-print-hover: #e4e4e7;
  
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Elements */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--text-secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* Helper Class for old templates */
.clearfix::after {
  content: "";
  clear: both;
  display: table;
}

.alignleft {
  float: left;
}

.alignright {
  float: right;
}

/* Layout Wrapper */
.wrapper {
  padding: 0 16px;
  margin: 0 auto;
  max-width: 1120px;
}

/* Main Container styling */
.main {
  padding: 32px 0;
}

.main .wrapper.clearfix {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px;
  border: 1px solid var(--border-light);
}

@media screen and (min-width: 768px) {
  .main .wrapper.clearfix {
    padding: 32px;
  }
}

/* ==========================================================================
   Header Section (Fixed & Responsive Center on Mobile)
   ========================================================================== */
.header {
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  padding: 16px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Tampilan default (HP): Susun ke bawah dan rata tengah */
.header .wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo {
  float: none;
  text-align: center;
}

.logo h1, .logo h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo a {
  color: var(--text-primary);
}

.topsearch {
  float: none;
  width: 100%;
  display: flex;
  justify-content: center;
}

.topsearch form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 320px;
}

.topsearch input {
  border: 1px solid var(--border-light);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-smooth);
  width: 100%;
  min-width: 0;
}

.topsearch input:focus {
  border-color: var(--border-dark);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.08);
}

.topsearch button {
  background: var(--text-primary);
  color: #ffffff;
  border: 1px solid var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  margin-left: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

/* ==========================================================================
   End of Header Section
   ========================================================================== */

/* Breadcrumbs styling */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 8px;
  padding: 8px 0;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  border: none;
  align-items: center;
}

.breadcrumb a {
  color: var(--text-secondary);
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--text-primary);
}

.breadcrumb>li+li:before {
  content: "/";
  padding: 0 4px;
  color: var(--text-muted);
}

/* Pagetitle / Gallery title */
h1.pagetitle, .gallery h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 12px;
}

h1.pagetitle::after, .gallery h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* Gallery layout */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0;
  clear: both;
}

@media screen and (min-width: 768px) {
  .gallery {
    gap: 20px;
  }
}

/* Post Cards */
.gallery .post {
  float: none;
  width: 100%;
  display: block;
  text-decoration: none;
}

.gallery .post .inner {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  box-shadow: var(--shadow-sm);
}

.gallery .post:hover .inner {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-dark);
}

.gallery .post .inner .img {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-light);
  padding: 16px;
  transition: var(--transition-smooth);
  overflow: hidden;
  position: relative;
}

.gallery .post:hover .inner .img {
  background: #ffffff;
}

.gallery .post .inner .img img {
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.gallery .post:hover .inner .img img {
  transform: scale(1.04);
}

.gallery .post .inner .title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 14px 12px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-card);
  line-height: 1.2;
  border: none;
}

/* Single Post details */
.content {
  padding: 0;
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.entry-content p {
  margin-bottom: 24px;
}

/* Attachment (Image) Page Layout */
.content.clearfix {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.image {
  float: none;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.image .img {
  padding: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fafafa;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 24px;
}

.image .img img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.06));
}

.image .title {
  border: none;
  padding: 0;
}

.image .title h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* Download Section (High CTR Button system) */
.image .download {
  border-top: none;
  border-bottom: 1px solid var(--border-light);
  padding: 0 0 24px 0;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.image .download a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-smooth);
  min-width: 160px;
  box-shadow: var(--shadow-sm);
  text-shadow: none;
}

/* PDF CTA: Black fill (Most Prominent) */
.image .download a[href*="pdf"] {
  background: var(--cta-pdf-bg);
  color: var(--cta-pdf-text);
  border: 2px solid var(--cta-pdf-bg);
}

.image .download a[href*="pdf"]:hover {
  background: var(--cta-pdf-hover);
  border-color: var(--cta-pdf-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* JPG CTA: Outline */
.image .download a:not([href*="pdf"]):not([onclick]) {
  background: var(--cta-jpg-bg);
  color: var(--cta-jpg-text);
  border: 2px solid var(--cta-jpg-border);
}

.image .download a:not([href*="pdf"]):not([onclick]):hover {
  background: var(--cta-jpg-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Print CTA: Soft gray fill */
.image .download a[onclick] {
  background: var(--cta-print-bg);
  color: var(--cta-print-text);
  border: 2px solid var(--cta-print-bg);
}

.image .download a[onclick]:hover {
  background: var(--cta-print-hover);
  border-color: var(--cta-print-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.image .download a:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}

/* Social Toolbox sharing */
.addthis_sharing_toolbox {
  margin: 16px 0;
  display: flex;
  justify-content: center;
}

/* Entry Meta data table */
.entry-meta {
  margin: 32px auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
}

.entry-meta tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-light);
}

.entry-meta td {
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: var(--bg-card);
}

.entry-meta td.left {
  font-weight: 700;
  color: var(--text-primary);
  width: 30%;
}

.entry-meta td i {
  margin-right: 8px;
  color: var(--text-muted);
}

.entry-meta a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
}

.entry-meta a:hover {
  color: var(--text-secondary);
}

/* Sidebar & Right ads panel */
.rads {
  float: none;
  width: 100%;
  padding: 0;
}

/* Ads Container styling */
.ads {
  margin: 32px 0;
  padding: 16px;
  background: #fafafa;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.ads::before {
  content: "Advertisement";
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

/* Navigation prev/next post */
.navigation {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 32px 0;
  clear: both;
}

.navigation a {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  margin: 0;
}

.navigation a:hover {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Categories Browse Box */
.category {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 40px 0 16px 0;
  box-shadow: var(--shadow-sm);
  text-align: left;
}

.category h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-align: left;
  position: relative;
  padding-bottom: 10px;
}

.category h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 4px;
  background: var(--text-primary);
  border-radius: 2px;
}

.category ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category ul li {
  float: none;
  width: 100%;
}

.category ul li a {
  display: block;
  padding: 12px 16px;
  background: #fafafa;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: var(--transition-smooth);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category ul li a:hover {
  background: var(--text-primary);
  color: #ffffff;
  border-color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Footer Section */
.footer {
  background: var(--bg-footer);
  color: var(--text-on-dark);
  padding: 56px 0 36px;
  border-top: 1px solid #1a1a1a;
  text-align: left;
}

.footer .wrapper {
  max-width: 1120px;
}

.footer .clearfix {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer .widget {
  float: none;
  width: 100%;
}

.footer .widget ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer .widget ul li a {
  color: var(--text-muted);
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.footer .widget ul li a:hover {
  color: #ffffff;
  padding-left: 6px;
}

.footer p {
  text-align: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #27272a;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Sidebar section if any */
.sidebar {
  margin: 24px 0;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media screen and (min-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .category ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer .clearfix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tablet & Desktop Layout Adjustment */
@media screen and (min-width: 768px) {
  /* Kembalikan header ke posisi kiri-kanan */
  .header .wrapper {
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
  }

  .logo {
    text-align: left;
  }

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

  .topsearch {
    width: auto;
    justify-content: flex-end;
  }

  .content.clearfix {
    flex-direction: row;
  }
  
  .image {
    flex: 2;
  }
  
  .rads {
    flex: 1;
  }
}

@media screen and (min-width: 960px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .category ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .footer .clearfix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}