/*
 * Z-Blog Theme acmeContract - Modern Slate/Indigo Theme
 * Spacing: 12px | Border-radius: 6px
 */

/* 1. Global Custom Theme Settings & Variables */
:root {
  --bulma-radius: 6px;
  --bulma-radius-large: 6px;
  --bulma-radius-medium: 6px;
  --bulma-radius-small: 4px;
  --bulma-radius-rounded: 290486px;
  
  /* Grid & Spacing Constraints (12px = 0.375rem padding) */
  --bulma-column-gap: 0.375rem; 
  --bulma-block-spacing: 12px;
  --bulma-card-radius: 6px;
  --bulma-box-radius: 6px;
  
  /* Premium Slate/Indigo Color Palette */
  --theme-primary: #4f46e5;       /* Indigo 600 */
  --theme-primary-hover: #4338ca; /* Indigo 700 */
  --theme-link: #6366f1;          /* Indigo 500 */
  --theme-bg: #f8fafc;            /* Slate 50 */
  --theme-card-bg: #ffffff;
  --theme-border: #f1f5f9;        /* Slate 100 */
  --theme-border-medium: #e2e8f0; /* Slate 200 */
  
  /* Typography Colors */
  --theme-text-main: #1e293b;     /* Slate 800 */
  --theme-text-title: #0f172a;    /* Slate 900 */
  --theme-text-muted: #64748b;    /* Slate 500 */
}

/* 2. Global Base Overrides */
html {
  font-size: 14.5px; /* Scale framework elements down globally */
}
html, body {
  background-color: var(--theme-bg);
  color: var(--theme-text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--theme-text-title) !important;
  font-weight: 700 !important;
}

a {
  color: var(--theme-link);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
a:hover {
  color: var(--theme-primary-hover);
}

/* Force 6px border radius on all Bulma components */
.box, 
.card, 
.card-image img, 
.image img, 
.button, 
.input, 
.textarea, 
.select select, 
.notification, 
.message, 
.panel, 
.tag, 
.pagination-link, 
.pagination-previous, 
.pagination-next {
  border-radius: 6px !important;
}

/* Section Margins */
.section {
  padding: 2rem 0.75rem !important;
}

/* Grid Spacing Constraints */
.columns {
  margin-left: -6px !important;
  margin-right: -6px !important;
  margin-top: -6px !important;
}
.columns:not(:last-child) {
  margin-bottom: 6px !important;
}
.column {
  padding: 6px !important;
}

/* 3. Floating Glassmorphism Navbar */
.navbar {
  background-color: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--theme-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

/* Navbar item links */
.navbar-item {
  color: var(--theme-text-muted) !important;
  font-weight: 500;
  border-radius: 6px;
  margin: 4px 2px;
  transition: all 0.2s ease;
}
.navbar-item:hover,
.navbar-item.is-active {
  background-color: #f1f5f9 !important;
  color: var(--theme-primary) !important;
}

/* 4. Carousel (vsCarousel) Setup */
.vsCarousel-container {
  height: 380px !important;
}
@media screen and (max-width: 1023px) {
  .vsCarousel-container {
    height: 250px !important;
  }
}
.vsCarousel {
  height: 100% !important;
  border-radius: 6px !important;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.vsCarousel-wrapper,
.vsCarousel-slide {
  height: 100% !important;
}
.vsCarousel .vsCarousel-slide .vsCarousel-box {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
}
.vsCarousel .vsCarousel-slide .vsCarousel-box > img {
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  opacity: 1 !important; /* Force opacity to 1 if it's hidden */
}
.vsCarousel img {
  border-radius: 6px !important;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* 5. Modern Author Profile Card */
.profile-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--theme-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
}
.profile-card .profile-banner {
  height: 110px;
  background-size: cover;
  background-position: center;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.profile-card .profile-avatar-wrap {
  position: relative;
  margin-top: -45px;
  display: flex;
  justify-content: center;
  z-index: 2;
}
.profile-card .profile-avatar-wrap img {
  width: 80px;
  height: 80px;
  border: 4px solid #ffffff;
  border-radius: 50% !important;
  box-shadow: 0 0 0 1px var(--theme-border-medium), 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-card:hover .profile-avatar-wrap img {
  transform: rotate(360deg) scale(1.05);
}
.profile-stats {
  border-top: 1px solid var(--theme-border);
  background-color: var(--theme-bg);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  margin: 16px -16px -16px -16px;
  padding: 12px;
}
.profile-stats-item {
  text-align: center;
}
.profile-stats-item:not(:last-child) {
  border-right: 1px solid var(--theme-border-medium);
}
.profile-stats-item .title {
  color: var(--theme-text-title) !important;
}

/* 6. Sidebar Widgets (Super Modernized) */
.sidebar .function {
  margin-bottom: 12px;
  padding: 16px;
  background-color: var(--theme-card-bg);
  border-radius: 6px;
  border: 1px solid var(--theme-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
}

.sidebar .function > dt {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--theme-text-title);
  border-left: 3px solid var(--theme-primary);
  border-bottom: none;
  padding-left: 10px;
  margin-bottom: 14px;
}

/* List elements hover slide transitions */
.sidebar .function_c ul li {
  padding: 8px 10px;
  border-bottom: none !important;
  border-radius: 6px;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap; /* Support nested lists */
  justify-content: space-between;
  align-items: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--theme-text-muted);
}
.sidebar .function_c ul li:hover {
  background-color: var(--theme-border);
  padding-left: 14px;
  color: var(--theme-text-main);
}
.sidebar .function_c ul li ul li:hover {
  background-color: transparent;
  padding-left: 8px;
}
.sidebar .function_c ul li a {
  color: var(--theme-text-main);
  flex-grow: 1;
}
.sidebar .function_c ul li a:hover {
  color: var(--theme-primary);
}

/* Nested sidebar list structures (Navbar/category dropdowns) */
.sidebar .function_c ul li ul {
  width: 100%;
  margin-left: 10px;
  margin-top: 6px;
  display: block;
}
.sidebar .function_c ul li ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-left: 2px solid var(--theme-border-medium);
  border-radius: 0;
  margin-bottom: 2px;
}

/* Calendar Widget */
#tbCalendar {
  width: 100%;
}
#tbCalendar caption {
  font-weight: 700;
  padding: 4px;
  color: var(--theme-text-title);
}
#tbCalendar th {
  color: var(--theme-text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}
#tbCalendar td a {
  background-color: var(--theme-primary);
  color: #ffffff !important;
  font-weight: bold;
  border-radius: 4px;
  padding: 2px 0;
  display: block;
}
#tbCalendar td a:hover {
  background-color: var(--theme-primary-hover);
}

/* Search Widget styling */
.sidebar #divSearchPanel .function_c form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.sidebar #divSearchPanel .function_c form input[type="text"],
.sidebar #divSearchPanel .function_c form input[type="search"] {
  flex-grow: 1;
  padding: 6px 12px;
  border: 1px solid var(--theme-border-medium);
  border-radius: 4px !important;
  outline: none;
  font-size: 0.85rem;
  color: var(--theme-text-main);
  background-color: #ffffff;
  transition: all 0.2s ease;
  width: 0; /* allows box to shrink and flex grow */
}
.sidebar #divSearchPanel .function_c form input[type="text"]:focus,
.sidebar #divSearchPanel .function_c form input[type="search"]:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 0.125em rgba(79, 70, 229, 0.15) !important;
}
.sidebar #divSearchPanel .function_c form input[type="submit"],
.sidebar #divSearchPanel .function_c form button {
  padding: 6px 16px;
  background-color: var(--theme-primary);
  color: #ffffff;
  border: none;
  border-radius: 4px !important;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sidebar #divSearchPanel .function_c form input[type="submit"]:hover,
.sidebar #divSearchPanel .function_c form button:hover {
  background-color: var(--theme-primary-hover);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

/* Tags Widget styling */
.sidebar #divTags .function_c div ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sidebar #divTags .function_c div ul li {
  padding: 0 !important;
  background: transparent !important;
}
.sidebar #divTags .function_c div ul li a {
  border-radius: 4px !important;
  font-size: 0.75rem !important;
  font-weight: 500;
  padding: 4px 10px !important;
}

/* Hot articles widget output */
#topArticl_module ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#topArticl_module ul li {
  padding: 0 !important;
  border-radius: 0;
  background-color: transparent !important;
}
#topArticl_module ul li:hover {
  background-color: transparent !important;
  padding-left: 0 !important;
}
#topArticl_module ul li a {
  display: flex;
  gap: 10px;
  align-items: center;
}
#topArticl_module ul li a img {
  width: 60px;
  height: 44px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--theme-border);
}
#topArticl_module ul li a p {
  font-size: 0.85rem;
  color: var(--theme-text-main);
  line-height: 1.3;
}
#topArticl_module ul li a:hover p {
  color: var(--theme-primary);
}

/* Control Panel widget items styling */
.sidebar #divContorPanel .cp-hello {
  font-size: 0.85rem;
  color: var(--theme-text-muted);
  margin-bottom: 8px;
  width: 100%;
}
.sidebar #divContorPanel .function_c > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.sidebar #divContorPanel .cp-login, 
.sidebar #divContorPanel .cp-vrs {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  border: 1px solid var(--theme-border-medium);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  background-color: var(--theme-bg);
  color: var(--theme-text-main);
  transition: all 0.2s;
  display: inline-block;
}
.sidebar #divContorPanel .cp-login:hover, 
.sidebar #divContorPanel .cp-vrs:hover {
  border-color: var(--theme-primary);
  color: var(--theme-primary);
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 7. Articles List Cards (Modern Cards) */
.post-list-item {
  background-color: var(--theme-card-bg);
  border: 1px solid var(--theme-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.post-list-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.04), 0 0 0 1px var(--theme-border-medium);
}
.post-list-item .post-title a {
  color: var(--theme-text-title);
  font-weight: 700;
}
.post-list-item .post-title a:hover {
  color: var(--theme-primary);
}
.post-list-item .post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.775rem;
  color: var(--theme-text-muted);
  margin: 8px 0 12px 0;
}
.post-list-item .post-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-list-item .post-meta img {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}
.post-list-item .post-thumbnail img {
  border-radius: 6px !important;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}
.post-list-item:hover .post-thumbnail img {
  transform: scale(1.03);
}

/* Sticky posts */
.post-list-item.is-sticky {
  border-left: 4px solid var(--theme-primary);
}

/* 8. Article details page */
.article-container {
  border: 1px solid var(--theme-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.02);
}
.article-header {
  border-bottom: 1px solid var(--theme-border);
  padding-bottom: 18px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--theme-text-muted);
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.article-meta img {
  width: 16px;
  height: 16px;
  opacity: 0.5;
}

/* Premium Typography content rules */
.content {
  color: var(--theme-text-main);
  line-height: 1.7 !important;
  font-size: 0.95rem;
}
.content p {
  margin-bottom: 1.25rem !important;
  text-align: justify;
}
.content blockquote {
  border-left: 4px solid var(--theme-primary) !important;
  background-color: var(--theme-bg) !important;
  padding: 16px 20px !important;
  border-radius: 0 6px 6px 0 !important;
  font-style: italic;
  color: #475569;
}

.article-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px dashed var(--theme-border-medium);
  padding-top: 16px;
}
.article-tags .tag {
  font-weight: 500;
  border-radius: 4px !important;
}

.article-nav {
  border-top: 1px solid var(--theme-border);
  padding-top: 16px;
}
.article-nav-item {
  padding: 10px 14px;
  background-color: var(--theme-bg);
  border: 1px solid var(--theme-border);
  transition: all 0.2s ease;
}
.article-nav-item:hover {
  background-color: #ffffff;
  border-color: var(--theme-border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 9. Comments & Forms (Modernized) */
.comment-container {
  border: 1px solid var(--theme-border);
}
.comment-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  border-left: 4px solid var(--theme-primary);
  padding-left: 10px;
}

.comment-list .media {
  border-top: 1px solid var(--theme-border);
  padding-top: 16px;
}
.comment-list .media .media {
  margin-top: 12px;
  background-color: var(--theme-bg);
  border-left: 2px solid var(--theme-border-medium);
  padding: 14px;
  border-radius: 6px;
}
.comment-list .media-left img {
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Modern inputs & textareas shadows */
.input, .textarea {
  border: 1px solid var(--theme-border-medium);
  background-color: #ffffff;
  transition: all 0.2s ease;
}
.input:focus, .textarea:focus {
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 0.125em rgba(79, 70, 229, 0.15) !important;
}

/* 10. pagination links */
.pagination-link.is-current {
  background-color: var(--theme-primary) !important;
  border-color: var(--theme-primary) !important;
  color: #ffffff !important;
}
.pagination-link:hover {
  border-color: var(--theme-primary);
}

/* 11. Custom back to top element */
.icon-top {
  position: fixed;
  z-index: 99;
  right: 24px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  background-color: var(--theme-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='22px' height='22px'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.icon-top.cd-is-visible {
  opacity: 1;
  visibility: visible;
}
.icon-top:hover {
  background-color: var(--theme-primary-hover);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}
