/*
Theme Name: Twenty Sixteen Child - Modern (ADA Optimized)
Template: twentysixteen
Author: Your Name
Description: A modern, clean redesign with WCAG 2.1 AA compliance and refined typography.
Version: 1.1.0
*/

/* ===================================
   IMPORT PARENT THEME
   =================================== */
@import url('../twentysixteen/style.css');

/* ===================================
   MODERN FOUNDATION
   =================================== */

body {
  background: #fafafa;
  /* System fonts are excellent for legibility */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  color: #333; /* Contrast: 12.6:1 (Pass) */
  line-height: 1.7; /* Good for dyslexia/readability */
}

.site {
  background: #fff;
  box-shadow: none;
  margin: 0;
}

.site-header-menu
{
    margin:0px;
}

/* Remove the dark borders from parent theme */
body:not(.custom-background-image):before,
body:not(.custom-background-image):after,
.entry-title{
  display: none !important;
}

/* ===================================
   ADA FOCUS STYLES (CRITICAL)
   =================================== */

/* Ensure keyboard users can see where they are focused */
*:focus {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* If browser supports focus-visible, use that to avoid outline on mouse clicks */
*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* ===================================
   STICKY HEADER
   =================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
  padding: 0 4.5455%; /* Simplified padding */
}

.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.site-header-main {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px; /* Ensure touch target height */
}

.site-branding {
  margin: 0;
}

.site-title {
  /* Reduced from 1.5rem */
  font-size: 1.375rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.site-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.site-title a:hover {
  color: #1d4ed8; /* Darker blue for contrast */
  text-decoration: underline; /* Accessibility best practice */
}

.site-description {
  display: none;
}

/* ===================================
   MODERN NAVIGATION
   =================================== */

@media screen and (min-width: 56.875em) {
  .main-navigation {
    margin: 0;
  }
  
  .main-navigation .primary-menu {
    display: flex;
    gap: 1.5rem; /* Reduced gap slightly */
    align-items: center;
    border: none;
  }
  
  .main-navigation .primary-menu > li {
    border: none;
    float: none;
  }
  
  .main-navigation a {
    color: #4a4a4a; /* Darkened from #555 for better contrast */
    font-weight: 500;
    /* Reduced from 0.9375rem */
    font-size: 0.875rem; 
    padding: 1em 0.5em; /* Increased padding for click target area */
    transition: color 0.2s;
  }
  
  .main-navigation a:hover,
  .main-navigation a:focus,
  .main-navigation li:hover > a,
  .main-navigation li.focus > a {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 4px;
  }
  
  .main-navigation .current-menu-item > a,
  .main-navigation .current-menu-ancestor > a {
    color: #000;
    font-weight: 700;
    border-bottom: 2px solid #1d4ed8; /* Visual indicator for current page */
  }
}

/* ===================================
   BREADCRUMBS
   =================================== */

.breadcrumbs-container {
  background: #fafafa;
  border-bottom: 0px solid #e5e5e5;
  padding: 0.75rem 4.5455%;
  padding-left:0px;
}

.breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 1rem; /* Reduced slightly */
  color: #666;
}

.breadcrumbs a {
  color: #1d4ed8;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: #333;
}

/* ===================================
   LAYOUT - TWO COLUMN
   =================================== */

.site-inner {
  max-width: 100%;
  background: #fafafa;
}

.site-content {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0px;
  background: #fafafa;
  box-sizing: border-box;
}

@media screen and (min-width: 56.875em) {
  .content-area {
    width: 725px;
    padding:0px;
    float: left;
    margin-right: -100%;
  }
  
  .sidebar {
    width: 250px;
    margin-left: calc(100% - 250px);
    float: left;
    padding: 0px;
  }
  
  .single .entry-header,
  .single .entry-content,
  .single .entry-summary,
  .single .entry-footer,
  .single .post-thumbnail {
    margin-right: 0;
    margin-left: 0;
  }
}

/* ===================================
   ARTICLE STYLING
   =================================== */

.site-main > article {
  background: #fff;
  padding: 3rem; /* Slightly reduced padding */
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

@media screen and (max-width: 56.875em) {
  .site-main > article {
    padding: 2rem 1.5rem;
  }
}

.entry-title {
  /* Reduced from 2.625rem */
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1a1a1a;
  font-weight: 700;
}

@media screen and (max-width: 56.875em) {
  .entry-title {
    font-size: 1.75rem;
  }
}

.entry-title a {
  color: #1a1a1a;
  text-decoration: none;
}

.entry-title a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Entry Meta */
.entry-meta,
.entry-footer {
  color: #555; /* Darkened for better readability */
  font-size: 0.8125rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.entry-footer {
  margin-top: 2rem;
  margin-bottom: 0;
  padding-top: 1.5rem;
  padding-bottom: 0;
  border-top: 1px solid #e5e5e5;
  border-bottom: none;
}

/* ===================================
   TYPOGRAPHY - ARTICLE CONTENT
   =================================== */

/* Base font size reduction for content */
.entry-content p,
.entry-summary p {
  /* Reduced from 1.125rem (18px) to 1rem (16px) */
  font-size: 1rem; 
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: #333;
}

.entry-content h2,
.entry-summary h2 {
  /* Reduced from 2rem */
  font-size: 1.75rem; 
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  font-weight: 700;
}

.entry-content h3,
.entry-summary h3 {
  /* Reduced from 1.5rem */
  font-size: 1.375rem; 
  margin-top: 1.75rem;
  margin-bottom: 0.875rem;
  color: #1a1a1a;
  font-weight: 700;
}

.entry-content h4,
.entry-summary h4 {
  /* Reduced from 1.125rem */
  font-size: 1.125rem; /* Kept same to distinguish from body */
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
  font-weight: 600;
}


/* ===================================
   SIDEBAR MODERN STYLING
   =================================== */

.sidebar .widget {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: none;
}

.sidebar .widget-title {
  font-size: 0.9375rem;
  margin: 0 0 1rem;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  font-weight: 700;
}

.sidebar .widget ul {
  list-style: none;
  margin: 0;
}

.sidebar .widget li {
  margin-bottom: 0.75rem;
}

.sidebar .widget a {
  color: #4b5563; /* Darker gray for contrast */
  text-decoration: none;
  font-size: 0.9375rem; /* Approx 15px */
  transition: color 0.2s;
  display: inline-block;
  padding: 2px 0; /* Better touch target spacing */
}

.sidebar .widget a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* Progress Indicator Widget */
.progress-indicator {
  background: #f3f4f6;
  padding: 1.25rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb; /* Subtle border for high contrast mode definition */
}

.progress-bar {
  background: #e5e7eb;
  height: 10px; /* Slightly thicker */
  border-radius: 5px;
  overflow: hidden;
  margin-top: 0.75rem;
}

.progress-fill {
  background: #059669; /* Darker green for contrast */
  height: 100%;
  width: 60%;
  border-radius: 5px;
}

/* ===================================
   COMMENTS
   =================================== */

.comments-area {
  margin-top: 3.5rem;
  padding: 2.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.comments-title,
.comment-reply-title {
  border-top: none;
  padding-top: 0;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

.comment-list article {
  border-top: 1px solid #e5e5e5;
  padding: 1.5rem 0;
}

.comment-author .avatar {
  border-radius: 50%;
}

/* ===================================
   FOOTER
   =================================== */

.site-footer {
  background: #fff;
  border-top: 1px solid #e5e5e5;
  padding: 2.5rem 4.5455%;
  margin-top: 3.5rem;
}

.site-info {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.875rem;
  color: #555;
}

.site-info a {
  color: #4b5563;
  text-decoration: underline; /* Links in footer should be underlined */
}

.site-info a:hover {
  color: #1d4ed8;
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media screen and (max-width: 56.875em) {
  .site-content {
    padding: 1rem;
  }
  
  .content-area, .sidebar {
    width: 100%;
    float: none;
    margin: 0;
  }
  
  /* Stack comments cleanly */
  .comments-area {
    padding: 1.5rem;
  }
}

/* ===================================
   UTILITY OVERRIDES & FORMS
   =================================== */

.widget, .page-header {
  border-top: none;
}

@media screen and (min-width: 44.375em) {
  .entry-header, .entry-content, .entry-summary, .entry-footer, .post-thumbnail, .comments-area {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
}

@media screen and (min-width: 61.5625em) {
  body:not(.search-results) article:not(.type-page) .entry-content,
  body:not(.search-results) article:not(.type-page) .entry-footer {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
  }
  
  body:not(.search-results) article:not(.type-page) .entry-footer > span:not(:last-child):after {
    display: inline-block !important;
  }
}

/* Accessible Link Styles */
.entry-content a,
.entry-summary a {
  color: #1d4ed8; /* AA Compliant Blue */
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: rgba(29, 78, 216, 0.3);
  text-underline-offset: 3px;
  font-weight: 500;
}

.entry-content a:hover,
.entry-summary a:hover {
  text-decoration-color: #1d4ed8;
  color: #1e40af; /* Darker on hover */
}

/* Accessible Button Styles */
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button {
  background: #1d4ed8; /* Compliant Blue */
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  padding: 0.875rem 1.75rem; /* Larger touch target */
  transition: background 0.2s;
  font-size: 1rem;
  cursor: pointer;
}

button:hover,
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="reset"]:hover,
input[type="reset"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
.button:hover {
  background: #1e40af; /* Darker Blue */
  border-color: #1e40af;
}

/* Accessible Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea {
  border: 1px solid #6b7280; /* Darker border for visibility (3:1 contrast) */
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 1rem;
  background: #fff;
  color: #1a1a1a;
  width: 100%;
  max-width: 100%;
}

/* Placeholder text contrast */
::placeholder {
  color: #6b7280; /* Ensures placeholder is readable */
  opacity: 1;
}

input:focus,
textarea:focus {
  border-color: #1d4ed8;
  outline: 2px solid #1d4ed8; /* Force outline visibility */
  outline-offset: -1px;
}