/*
Theme Name: ToProste
Theme URI: https://szymonsarnecki.pl/
Author: Szymon Sarnecki
Author URI: https://szymonsarnecki.pl/
Description: Lekki, responsywny motyw WP z nowoczesnym headerem i footerem, gotowy pod Elementor Free.
Version: 1.3
License: GNU General Public License v2 or later
Text Domain: toproste
*/

/* -------------------------------------------------------------------------- */
/*                                  Variables                                 */
/* -------------------------------------------------------------------------- */
:root {
  --primary-color: #00D0EA;
  --secondary-color: #7C4DFF;
  --primary-gradient: linear-gradient(45deg, var(--primary-color), var(--secondary-color));

  --text-color: #333333;
  --text-light: #555555;
  --text-inverse: #FFFFFF;

  --background-color: #FFFFFF;
  --background-light-gray: #F8F9FA;
  --border-color: #E0E0E0;

  --footer-bg: #242424;
  --footer-text-color: #E0E0E0;
  --footer-link-color: var(--primary-color);
  --footer-link-hover-color: var(--secondary-color);
  --footer-border-color: #3a3a3a;

  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-secondary: 'Inter', sans-serif;

  --header-height: 80px;
  --header-height-sticky: 70px;
  --container-width: 1330px;
  --spacing-unit: 1rem;
}

@media (max-width: 768px) {
:root {
  --header-height: 70px;
  --header-height-sticky: 60px;
  }
}

/* -------------------------------------------------------------------------- */
/*                                Global Resets & Base                        */
/* -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--text-color);
  background-color: var(--background-color);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 700;
  margin-top: calc(var(--spacing-unit) * 1.5);
  margin-bottom: var(--spacing-unit);
  line-height: 1.3;
  color: var(--text-color);
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

.container {
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: calc(var(--spacing-unit) * 1.5);
  padding-right: calc(var(--spacing-unit) * 1.5);
}

/* Accessibility */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.skip-link:focus {
    background-color: var(--background-light-gray);
    color: var(--text-color);
    display: block;
    font-size: 1em;
    font-weight: bold;
    padding: 15px 23px 14px;
    text-decoration: none;
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 100000;
    clip: auto !important;
    clip-path: none;
    height: auto;
    width: auto;
    line-height: normal;
}

.no-scroll {
  overflow: hidden;
}

/* -------------------------------------------------------------------------- */
/*                                    Header                                  */
/* -------------------------------------------------------------------------- */
.to-proste-header {
  background-color: var(--background-color);
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: height 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease-in-out;
  border-bottom: 1px solid transparent;
}

.to-proste-header.is-sticky {
  height: var(--header-height-sticky);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
}
.to-proste-header.header-hidden {
    transform: translateY(-100%);
}

.header-inner {
  max-width: var(--container-width);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(var(--spacing-unit) * 1.5);
}

.site-branding .custom-logo {
  max-height: calc(var(--header-height) - (var(--spacing-unit) * 2));
  width: auto;
  transition: max-height 0.3s ease;
}
.to-proste-header.is-sticky .site-branding .custom-logo {
  max-height: calc(var(--header-height-sticky) - (var(--spacing-unit) * 1.5));
}
.site-branding .site-title a {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
}
.site-branding .site-title a:hover {
  color: var(--primary-color);
}
.site-branding .site-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: -5px;
}

.main-navigation {
  margin-left: auto;
}

.header-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.header-menu li {
  margin-left: calc(var(--spacing-unit) * 1.5);
}

.header-menu a {
  display: block;
  padding: calc(var(--spacing-unit) * 0.5) 0;
  text-decoration: none;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  letter-spacing: 0.5px;
}

.header-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.header-menu a:hover::after,
.header-menu .current-menu-item > a::after,
.header-menu .current-menu-ancestor > a::after {
  width: 100%;
}
.header-menu a:hover,
.header-menu .current-menu-item > a,
.header-menu .current-menu-ancestor > a {
    color: var(--primary-color);
    text-decoration: none;
}

.header-actions {
    display: flex;
    align-items: center;
    margin-left: calc(var(--spacing-unit) * 2);
}
.cta-button {
  padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 1.2);
  background: var(--primary-gradient);
  color: var(--text-inverse) !important;
  border-radius: 50px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 208, 234, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 77, 255, 0.4);
  color: var(--text-inverse) !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  padding: calc(var(--spacing-unit) * 0.5);
  cursor: pointer;
  margin-left: var(--spacing-unit);
  line-height: 0;
}
.menu-toggle svg {
    stroke: currentColor;
    fill: currentColor;
}
.menu-toggle .icon-close {
    display: none;
}
.menu-toggle.toggled .icon-menu {
    display: none;
}
.menu-toggle.toggled .icon-close {
    display: block;
}

@media (max-width: 991px) {
  .main-navigation {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--background-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: var(--spacing-unit);
    border-top: 1px solid var(--border-color);
    z-index: 999;
  }
  .to-proste-header.is-sticky .main-navigation {
      top: var(--header-height-sticky);
  }

  .main-navigation.nav-open {
    display: block;
  }

  .header-menu {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-menu li {
    margin-left: 0;
    width: 100%;
  }

  .header-menu a {
    padding: calc(var(--spacing-unit) * 0.75) var(--spacing-unit);
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  .header-menu li:last-child a {
      border-bottom: none;
  }
  .header-menu a::after {
      display: none;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 767px) {
    .cta-button {
        padding: calc(var(--spacing-unit) * 0.5) var(--spacing-unit);
        font-size: 10px;
    }
    .site-branding .custom-logo {
        max-height: calc(var(--header-height) - (var(--spacing-unit) * 2.5));
    }
    .to-proste-header.is-sticky .site-branding .custom-logo {
        max-height: calc(var(--header-height-sticky) - (var(--spacing-unit) * 2));
    }
    .header-inner {
        padding: 0 var(--spacing-unit);
    }
}

/* -------------------------------------------------------------------------- */
/*                                    Footer                                  */
/* -------------------------------------------------------------------------- */
.to-proste-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text-color);
  padding: calc(var(--spacing-unit) * 3.5) 0 calc(var(--spacing-unit) * 2);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-main {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 calc(var(--spacing-unit) * 1.5);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 2);
}

.footer-column {
  padding: 0;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
    margin-bottom: var(--spacing-unit);
}
.footer-column .footer-site-title a {
    color: var(--text-inverse);
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    margin-bottom: var(--spacing-unit);
}
.footer-column .footer-site-title a:hover {
    color: var(--primary-color);
}

.footer-widget-title {
  font-family: var(--font-secondary);
  font-size: 1.15rem;
  color: var(--text-inverse);
  margin-bottom: calc(var(--spacing-unit) * 1.25);
  position: relative;
  padding-bottom: calc(var(--spacing-unit) * 0.6);
}
.footer-widget-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer-column p,
.footer-column address p {
  margin-bottom: calc(var(--spacing-unit) * 0.6);
  color: var(--footer-text-color);
}
.footer-column .footer-about-text {
    opacity: 0.9;
}

.footer-column a {
  color: var(--footer-link-color);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.footer-column a:hover {
  color: var(--footer-link-hover-color);
  opacity: 0.85;
  text-decoration: none;
}

.footer-nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-nav-menu li {
  margin-bottom: calc(var(--spacing-unit) * 0.6);
}
.footer-nav-menu a {
  display: inline-block;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--spacing-unit) * 0.8);
  margin-top: calc(var(--spacing-unit) * 0.75);
}
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--footer-text-color);
  border: 1px solid var(--footer-border-color);
  border-radius: 50%;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.social-links a svg {
  width: 20px;
  height: 20px;
  fill: currentColor; /* Upewnij się, że SVG ma ten atrybut, aby dziedziczyć kolor */
}
.social-links a:hover {
  color: var(--text-inverse);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  text-decoration: none;
}

.footer-bottom {
  max-width: var(--container-width);
  margin: calc(var(--spacing-unit) * 3) auto 0;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 1.5) 0;
  border-top: 1px solid var(--footer-border-color);
  text-align: center;
  font-size: 0.85rem;
  color: #999;
}
.footer-bottom p {
    margin: calc(var(--spacing-unit)*0.4) 0;
}
.footer-bottom .copyright-text a,
.footer-bottom .to-proste-credit a {
  color: var(--footer-link-color);
  font-weight: 500;
}
.footer-bottom .copyright-text a:hover,
.footer-bottom .to-proste-credit a:hover {
  color: var(--footer-link-hover-color);
}

/* Elementor specific - ensure header is above Elementor's Z-index if needed */
body.elementor-page .to-proste-header {
    z-index: 1001;
}

/* Dodatkowe style dla WordPressa */
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; margin-bottom: 1em; }