/*
Theme Name: G5LSB Hello Elementor Child
Theme URI: https://g5lsb.com/
Description: Lekki child theme Hello Elementor dla G5LSB.com.
Author: G5LSB
Template: hello-elementor
Version: 1.0.0
Text Domain: g5lsb-child
*/

:root {
  --g5lsb-bg: #ebebeb;
  --g5lsb-surface: #fff;
  --g5lsb-text: #222;
  --g5lsb-link: #542607;
  --g5lsb-accent: #775353;
  --g5lsb-accent-dark: #553939;
  --g5lsb-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ========================================
   GLOBAL + TYPOGRAFIA
   ======================================== */
body {
  background-color: var(--g5lsb-bg);
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--g5lsb-text);
  -webkit-text-size-adjust: 100%;
}

.page-content * {
  box-sizing: border-box;
}

p, li, a, span {
  font-size: 1.1rem;
  line-height: inherit;
}

h1,
.entry-title,
.elementor-widget-heading h1.elementor-heading-title {
  font-size: 1.3rem !important;
  line-height: 1.3 !important;
  font-weight: 600;
  margin-top: 0.6em;
  margin-bottom: 0.4em;
}

h2,
.elementor-widget-heading h2.elementor-heading-title {
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  font-weight: 600;
  margin-top: 0.6em;
  margin-bottom: 0.4em;
}

h3,
.elementor-widget-heading h3.elementor-heading-title {
  font-size: 1.1rem !important;
  line-height: 1.3 !important;
  font-weight: 600;
  margin-top: 0.6em;
  margin-bottom: 0.4em;
}

ul, ol {
  padding-left: 1.4rem;
  list-style-position: outside;
}

body a {
  color: var(--g5lsb-link);
  text-decoration: none;
}

body a:hover {
  color: var(--g5lsb-accent);
  text-decoration: underline;
}

/* ========================================
   TREŚĆ, STRONY I WPISY
   ======================================== */
.site-main,
.elementor-section-wrap,
.elementor-container {
  margin: 0 auto !important;
  padding: 0 !important;
  max-width: 1200px !important;
  box-sizing: border-box;
}

.entry-content,
.page-content,
#comments,
.archive-header,
.archive-posts {
  background-color: var(--g5lsb-surface);
  border-radius: 6px;
  box-shadow: var(--g5lsb-shadow);
  width: 95%;
  max-width: 1160px;
  margin: 30px auto;
  box-sizing: border-box;
}

.entry-content,
.page-content {
  padding: 35px 15px;
}

.entry-header-block {
  text-align: center;
}

.entry-content p,
.page-content p,
.elementor-widget-container p,
.entry-content li,
.page-content li,
.entry-content a,
.page-content a {
  font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.05rem);
  line-height: 1.4;
}

.entry-content p,
.page-content p,
.elementor-widget-container p {
  text-align: justify;
  margin-bottom: 1em;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  margin-top: 1.25em;
  margin-bottom: 0.8em;
}

.page-content p + p {
  margin-top: 1.25em;
}

.page-content h2 + p,
.page-content h3 + p {
  margin-top: 0.9em;
}

.entry-content ul,
.entry-content ol,
.page-content ul,
.page-content ol {
  padding-left: 45px;
}

.entry-content img,
.page-content img {
  max-width: 700px;
  width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: 4px;
}

.entry-thumbnail img {
  width: 100%;
  max-width: 700px;
  height: auto;
  display: block;
  margin: 20px auto 10px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#entry-header-top {
  margin-top: 10px;
  margin-bottom: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

#entry-header-top .entry-title {
  margin-top: 5px;
  margin-bottom: 10px;
}

.single .entry-content.page-content {
  padding-top: 10px;
  margin-top: 0;
}

.single .entry-title {
  text-align: center;
}

body.home #entry-header-top {
  display: none !important;
}

body.page:not(.home) main .entry-title {
  text-align: center;
}

/* ========================================
   HEADER
   Podmień tło na własny banner, gdy będzie gotowy.
   ======================================== */
.site-header {
    position: relative;
    width: 95% !important;
    max-width: 1140px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    aspect-ratio: 1920 / 300;
    height: auto !important;

    background: url("/wp-content/themes/hello-elementor-child/header.jpg") no-repeat center top;
    background-size: 100% auto !important;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  color: #fff;
}

.site-header .site-title,
.site-header .site-title a {
  font-size: 2rem !important;
  font-weight: 700;
  line-height: 1.3 !important;
  color: #fff !important;
  text-decoration: none;
  margin: 0 0 8px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

/* ========================================
   MENU DESKTOP + SUBMENU
   ======================================== */
#menu-toggle {
  display: none;
}

.site-header .site-nav > ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  margin: 0;
  padding: 0;
}

.site-header .site-nav li {
  position: relative;
  display: inline-block;
}

.site-header .site-nav a {
  color: #fff !important;
  font-weight: 500;
  text-decoration: none;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
  transition: opacity 0.2s ease;
}

.site-header .site-nav a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.site-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--g5lsb-accent);
  padding: 10px 20px;
  margin: 0;
  list-style: none;
  min-width: 180px;
  border-radius: 6px;
  z-index: 9999;
}

.site-nav li.menu-item-has-children:hover > .sub-menu,
.site-nav li.menu-item-has-children:focus-within > .sub-menu {
  display: block;
}

.site-nav .sub-menu a {
  display: block;
  padding: 8px 12px;
  text-align: left;
  white-space: nowrap;
  font-size: 1rem;
}

.site-nav .sub-menu a:hover {
  background: var(--g5lsb-accent-dark);
}

.site-nav li.menu-item-has-children > a::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #fff;
  position: relative;
  top: -1px;
}

/* ========================================
   WYSZUKIWARKA
   ======================================== */
.desktop-search-in-header {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
  width: min(260px, 30vw);
}

.search-form {
  display: flex;
  gap: 6px;
}

.search-form label {
  flex: 1;
}

.search-form .search-field {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}

.search-form .search-submit {
  padding: 7px 12px;
}

.header-search-toggle {
  display: none;
}

.g5lsb-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.72);
  padding: 70px 20px 20px;
}

.g5lsb-search-overlay.is-open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.g5lsb-search-overlay-inner {
  position: relative;
  width: min(720px, 100%);
  background: #fff;
  padding: 55px 25px 30px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.g5lsb-search-overlay .search-form {
  width: 100%;
}

.overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

body.g5lsb-overlay-open {
  overflow: hidden;
}

/* ========================================
   ARCHIWA KATEGORII I TAGÓW
   ======================================== */
.archive-header,
.archive-posts {
  padding: 35px 40px;
}

.archive-header {
  text-align: center;
  margin-bottom: 20px;
}

.archive-title {
  font-size: 1.8rem !important;
  font-weight: 700;
  margin: 0 0 15px;
}

.archive-description {
  font-size: 1.05rem;
  line-height: 1.6;
}

.archive-posts {
  margin-top: 0;
  margin-bottom: 40px;
}

.archive-post-item {
  border-bottom: 1px solid #ddd;
  padding-bottom: 20px;
  margin-bottom: 25px;
}

.archive-post-item:last-of-type {
  border-bottom: 0;
}

.archive-post-title {
  font-size: 1.2rem !important;
  margin: 5px 0 10px;
}

.archive-post-excerpt {
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: justify;
}

.navigation.pagination {
  text-align: center;
  margin-top: 30px;
}

/* ========================================
   KOMENTARZE
   ======================================== */
#comments {
  margin: 40px auto 60px;
  padding: 15px;
}

#comments input,
#comments textarea {
  max-width: 100%;
  box-sizing: border-box;
}

/* ========================================
   STOPKA
   ======================================== */
.site-footer {
  background: var(--g5lsb-accent);
  color: #fff;
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
}

.site-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer p {
  margin: 0 auto;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  text-align: center;
}

/* ========================================
   PRZYCISKI
   ======================================== */
button,
input[type="submit"],
a.button {
  background-color: var(--g5lsb-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.2s ease-in-out;
  background-image: none !important;
}

button:hover,
input[type="submit"]:hover,
a.button:hover {
  background-color: var(--g5lsb-accent-dark);
}

/* ========================================
   MOBILE
   ======================================== */
@media (max-width: 900px) {
  html,
  body {
    font-size: 17px;
  }

  .site-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: auto !important;
    aspect-ratio: 1920 / 300;
    background-size: 100% auto !important;
  }

  .site-header .site-title,
  .site-header .site-title a {
    font-size: 18px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
  }

  #menu-toggle {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    background: var(--g5lsb-accent);
    color: #fff;
    border: none;
    border-radius: 0;
    padding: 8px 12px;
    font-size: 1.4rem;
    z-index: 10001;
  }

  .site-header .site-nav > ul {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--g5lsb-accent);
    position: fixed;
    top: 45px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 45px);
    overflow-y: auto;
    padding: 0;
    margin: 0;
    z-index: 10000;
  }

  .site-nav.is-open > ul {
    display: flex;
  }

  .site-header .site-nav li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .site-nav > ul > li > a,
  .site-nav .sub-menu a {
    display: block;
    padding: 8px 12px;
    text-align: center;
    line-height: 1.2;
  }

  .site-nav .sub-menu {
    display: block;
    position: static;
    transform: none;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: rgba(0,0,0,0.08);
  }

  .site-nav .sub-menu a {
    font-size: 0.95rem;
  }

  .site-nav li.menu-item-has-children > a::after {
    display: none;
  }

  .desktop-search-in-header {
    display: none;
  }

  .header-search-toggle {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0;
    background: var(--g5lsb-accent);
    color: #fff;
    z-index: 10001;
  }

  .entry-content,
  .page-content,
  .archive-header,
  .archive-posts {
    width: 96%;
    padding-left: 15px;
    padding-right: 15px;
  }

  .entry-content ul,
  .entry-content ol,
  .page-content ul,
  .page-content ol {
    padding-left: 32px;
  }

  .archive-header,
  .archive-posts {
    padding-top: 25px;
    padding-bottom: 25px;
  }
}