/*
Theme Name: Kerlacki
Description: A modern, mobile-first WordPress theme optimized for kerlacki.com. Features responsive design, clean typography, and professional layout perfect for business websites.
Version: 1.0.0
Author: Custom Theme Developer
Text Domain: kerlacki
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #1f2937;
}

h1 { font-size: 1.875rem; } /* 30px */
h2 { font-size: 1.5rem; }   /* 24px */
h3 { font-size: 1.25rem; }  /* 20px */
h4 { font-size: 1.125rem; } /* 18px */
h5 { font-size: 1rem; }     /* 16px */
h6 { font-size: 0.875rem; } /* 14px */

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1d4ed8;
}

/* Layout Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-content {
  min-height: calc(100vh - 200px);
}

/* Header Styles */
.site-header {
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.site-branding .site-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
  text-decoration: none;
  margin: 0;
}

.site-branding .site-description {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

/* Navigation */
.main-navigation {
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-menu li a {
  display: block;
  padding: 0.5rem 0;
  color: #374151;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu li a:hover {
  color: #2563eb;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  color: #374151;
}

.menu-toggle:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 0;
    padding: 1rem;
  }

  .main-navigation .nav-menu.active {
    display: flex;
  }

  .nav-menu li a {
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-menu li:last-child a {
    border-bottom: none;
  }
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

.content-area {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

/* Post/Page Content */
.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.entry-meta {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.entry-content {
  margin-bottom: 2rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Post Navigation */
.post-navigation {
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 2rem 0;
  margin: 2rem 0;
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.nav-previous,
.nav-next {
  flex: 1;
}

.nav-next {
  text-align: right;
}

/* Sidebar */
.sidebar {
  margin-top: 2rem;
}

.widget {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
}

.widget-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #1f2937;
}

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

.widget ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.widget ul li:last-child {
  border-bottom: none;
}

/* Comments */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.comments-title {
  margin-bottom: 2rem;
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
}

.comment-meta {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

/* Forms */
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form .form-submit input {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s ease;
}

.comment-form .form-submit input:hover {
  background: #1d4ed8;
}

/* Footer */
.site-footer {
  background: #1f2937;
  color: #d1d5db;
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
}

.footer-content p {
  margin: 0;
  font-size: 0.875rem;
}

.footer-content a {
  color: #9ca3af;
}

.footer-content a:hover {
  color: #fff;
}

/* Utility Classes */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.alignwide {
  margin-left: -2rem;
  margin-right: -2rem;
  max-width: calc(100vw - 2rem);
}

.alignfull {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  max-width: 100vw;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
  html {
    font-size: 18px;
  }

  .container {
    padding: 0 2rem;
  }

  .header-container {
    padding: 1.5rem 2rem;
  }

  .content-area {
    grid-template-columns: 1fr 300px;
    gap: 3rem;
  }

  .sidebar {
    margin-top: 0;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5rem; }

  .entry-title {
    font-size: 2.5rem;
  }

  .alignwide {
    margin-left: -3rem;
    margin-right: -3rem;
  }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
  .container {
    padding: 0 3rem;
  }

  .main-content {
    padding: 3rem 0;
  }

  .content-area {
    gap: 4rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }

  .entry-title {
    font-size: 3rem;
  }
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .post-navigation,
  .comments-area {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  a {
    text-decoration: underline;
  }
}

/* WordPress Core Styles */
.wp-block-image {
  margin: 2rem 0;
}

.wp-block-quote {
  border-left: 4px solid #2563eb;
  padding-left: 1rem;
  margin: 2rem 0;
  font-style: italic;
}

.wp-block-button .wp-block-button__link {
  background: #2563eb;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.wp-block-button .wp-block-button__link:hover {
  background: #1d4ed8;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999999;
  padding: 8px 16px;
  background: #000;
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 6px;
  top: 7px;
}