/*
Theme Name: NEVV Company Theme
Theme URI: https://nevv.pl/
Author: Janusz Borkowski
Author URI: https://nevv.pl/
Description: Lekki, samowystarczalny motyw wizytówkowy oparty o system tagów FIRMA i MINISTRONA.
Version: 1.0
License: GPLv3
Text Domain: company-theme
Tags: one-page, business, seo, minimalist
*/

/* === UKŁAD GŁÓWNY === */
body {
  margin: 0;
  background: var(--wp--preset--color--background);
  color: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--main);
  line-height: 1.6;
}

/* kontener centralny */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10%;
}

/* sekcja główna */
.site-main {
  background: var(--wp--preset--color--surface);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* === HEADER === */
.site-header {
  position: relative;
  background: var(--wp--preset--color--surface);
  padding: 1.5rem 0;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.site-title a {
  text-decoration: none;
  color: var(--wp--preset--color--primary);
  font-family: var(--wp--preset--font-family--headings);
  font-size: 2rem;
}

/* menu */
.company-menu a {
  background-color: var(--color-button);
  color: #fff;
  transition: all 0.3s ease;
}

.company-menu a:hover {
  background-color: color-mix(in srgb, var(--color-button) 80%, black);
}

.company-menu a.active {
  background-color: var(--color-active-button);
}


.site-nav ul {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

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

.site-nav a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 9999px; /* "pill" look */
  background-color: var(--wp--preset--color--menu-bg);
  color: var(--wp--preset--color--menu-text);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-nav a:hover {
  background-color: var(--wp--preset--color--menu-active-bg);
  color: var(--wp--preset--color--menu-active-text);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* === AKTYWNA STRONA === */
.site-nav .current-menu-item a,
.site-nav .current_page_item a,
.site-nav a.active {
  background-color: var(--wp--preset--color--menu-active-bg);
  color: var(--wp--preset--color--menu-active-text);
}


/* breadcrumbs */
.breadcrumbs-wrapper {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* === FOOTER === */
.site-footer {
  background: var(--wp--preset--color--surface);
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  border-radius: 10px 10px 0 0;
}

.firma-info {
  margin-bottom: 1rem;
}

/* === HERO IMAGE === */
.hero {
  width: 100%;
  max-height: 300px;
  overflow: hidden;
  border-radius: 0 0 12px 12px;
}
.hero img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 600px) {
  .site-nav ul {
    flex-direction: column;
    align-items: center;
  }
  .site-nav a {
    width: 80%;
    text-align: center;
  }
}

/* === MOBILE MENU === */


.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  padding: 0;
  z-index: 1000;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--wp--preset--color--menu-bg);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* animacja w stanie aktywnym */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    margin: 1rem auto;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background: var(--wp--preset--color--surface);
    padding: 1rem;
    margin: 0 10%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    position: relative;
    z-index: 999;
  }

  .site-nav.open {
    display: flex;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* przyciski menu - wersja mobile */
  .site-nav a {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }
}

/* === MOBILE MENU FIX === */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex !important;
    margin: 1rem auto;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background: var(--wp--preset--color--surface);
    padding: 1rem;
    margin: 0 10%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 999;
  }

  .site-nav.open {
    display: flex !important;
  }

  .site-nav a {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }
}


/* === FIX: Wymuszone widoczne menu mobilne === */

/* przycisk hamburgera – widoczny tylko na małych ekranach */
@media (max-width: 900px) {
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
    margin: 1rem auto;
  }

  .menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--wp--preset--color--menu-bg, #283593);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* animacja hamburgera */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* menu początkowo ukryte */
  .site-nav {
    display: none !important;
    flex-direction: column;
    align-items: center;
    background: var(--wp--preset--color--surface, #fff);
    padding: 1rem;
    margin: 0 10%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 999;
  }

  /* pokazane po kliknięciu hamburgera */
  .site-nav.open {
    display: flex !important;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* przyciski w menu mobilnym */
  .site-nav a {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: 9999px;
  }
}

/* na dużych ekranach ukryj hamburgera */
@media (min-width: 901px) {
  .menu-toggle {
    display: none !important;
  }
}


body {
  color: var(--color-text);
  background-color: var(--color-background);
  font-family: var(--font-header);
}

button,
.site-nav a,
.wp-block-button__link {
  background-color: var(--color-button);
  color: #fff;
}

button:hover,
.wp-block-button__link:hover {
  background-color: color-mix(in srgb, var(--color-button) 80%, black);
}

/* MENU */
.company-menu a {
  background-color: var(--color-button);
  color: #fff;
  transition: all 0.3s ease;
}

.company-menu a:hover {
  background-color: color-mix(in srgb, var(--color-button) 80%, black);
}

.company-menu a.active {
  background-color: var(--color-active-button);
}

/* STOPKA */
.site-footer,
.site-footer p,
.site-footer a {
  color: var(--color-footer-text);
}

.site-footer a:hover {
  text-decoration: underline;
}


/* Wyśrodkowanie obrazków w treści wpisów / stron */
.wp-block-image {
  text-align: center;
  display: block;
}

.wp-block-image img {
  display: inline-block;
  margin: 0 auto;
}

/* Dla starszych klas WordPressa (np. classic editor) */
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.site-main img {
  max-width: 100%;
  height: auto;
}
