/* Self-hosted fonts – Raleway & Open Sans (latin + latin-ext) */
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/raleway-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Raleway';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/raleway-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/opensans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/opensans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/opensans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 700;
  font-stretch: 100%;
  font-display: swap;
  src: url('assets/fonts/opensans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Basic styling for the static Zalatek site */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: #000;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

/* Header */
.site-header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-header .logo img {
  height: 60px;
}

/* Hamburger menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.site-nav a {
  text-decoration: none;
  color: #444;
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}
.site-nav a:hover {
  color: #dd9933;
}

/* Hero */
.hero-section {
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
    url('assets/images/hero5.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #fff;
  text-align: center;
  padding: 8rem 1rem;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-section .container {
  width: 100%;
}
.hero-section h1 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-size: 75px;
  font-weight: 800;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 4px;
  line-height: 1.3;
}

/* Rotating text – fixed height using longest word as invisible sizer */
.rotating-wrapper {
  display: inline-grid;
  vertical-align: baseline;
}
.rotating-sizer,
.rotating-text {
  grid-area: 1 / 1;
}
.rotating-sizer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
.rotating-text {
  display: inline-block;
}

/* flipInX keyframes */
@keyframes flipInX {
  0% {
    transform: perspective(400px) rotateX(90deg);
    opacity: 0;
  }
  40% {
    transform: perspective(400px) rotateX(-20deg);
  }
  60% {
    transform: perspective(400px) rotateX(10deg);
    opacity: 1;
  }
  80% {
    transform: perspective(400px) rotateX(-5deg);
  }
  100% {
    transform: perspective(400px) rotateX(0deg);
    opacity: 1;
  }
}
.rotating-text.flip-in {
  animation: flipInX 0.75s ease-in-out;
}
.hero-section p {
  font-size: 22px;
  font-weight: 300;
  letter-spacing: 0.4px;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.button-group .btn {
  display: inline-block;
  margin: 0 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  color: #fff;
  background-color: #dd9933;
  border: 2px solid #dd9933;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  font-family: 'Open Sans', Helvetica, Arial, sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 17px;
  letter-spacing: 1px;
}
.button-group .btn.btn-secondary {
  background-color: transparent;
  border-color: #fff;
}
.button-group .btn:hover {
  background-color: #c4862d;
  border-color: #c4862d;
}
.button-group .btn.btn-secondary:hover {
  background-color: #fff;
  color: #333;
  border-color: #fff;
}

/* Sections */
section {
  padding: 4rem 0;
}
section h2 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-size: 40px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #333;
}

.about-section p {
  margin-bottom: 1rem;
  text-align: center;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.value-item {
  text-align: center;
  padding: 1.5rem 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.value-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}
.value-item i {
  font-size: 2.5rem;
  color: #dd9933;
  margin-bottom: 0.75rem;
  display: block;
}
.value-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #333;
}
.value-item p {
  font-size: 0.9rem;
  color: #666;
}

/* Partners */
.partners-section .partners-image {
  text-align: center;
}
.partners-section img {
  max-width: 100%;
  height: auto;
}

/* Webs */
.webs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  align-items: center;
  justify-items: center;
}
.webs-grid img {
  max-width: 100%;
  height: auto;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  transition: transform 0.3s ease;
}
.webs-grid a:hover img {
  transform: scale(1.05);
}

/* Contact */
.contact-section {
  background-color: #f5f5f5;
  text-align: center;
}
.contact-section .email-link {
  color: #dd9933;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
}
.contact-section .email-link:hover {
  text-decoration: underline;
}
.contact-section .email-link i {
  margin-right: 0.5rem;
}

/* Footer */
.site-footer {
  background-color: #111;
  color: #bbb;
  text-align: left;
  padding: 1.5rem 0;
  font-size: 0.9rem;
}
.site-footer a {
  color: #777;
  text-decoration: none;
}
.site-footer a:hover {
  color: #dd9933;
  text-decoration: none;
}

/* Scroll-to-top button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background-color: #dd9933;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-top.visible {
  opacity: 1;
  visibility: visible;
}
.scroll-top:hover {
  background-color: #c4862d;
}

/* Entry animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.hero-section h1,
.hero-section p,
.hero-section .button-group {
  opacity: 0;
  transform: rotateX(90deg);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.hero-section h1.animate {
  opacity: 1;
  transform: rotateX(0deg);
  transition-delay: 0.1s;
}
.hero-section p.animate {
  opacity: 1;
  transform: rotateX(0deg);
  transition-delay: 0.3s;
}
.hero-section .button-group.animate {
  opacity: 1;
  transform: rotateX(0deg);
  transition-delay: 0.5s;
}

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .site-nav.open {
    max-height: 300px;
  }
  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .site-nav a {
    display: block;
    padding: 0.75rem 1.5rem;
  }
  .site-nav a:hover {
    background-color: #f5f5f5;
  }
  .hero-section {
    padding: 5rem 1rem;
    min-height: 50vh;
    background-attachment: scroll;
  }
  .hero-section h1 {
    font-size: 36px;
    letter-spacing: 2px;
  }
  .hero-section p {
    font-size: 16px;
  }
  .button-group .btn {
    display: block;
    margin: 0.5rem auto;
    max-width: 250px;
  }
  .values-grid {
    grid-template-columns: 1fr;
  }
  .webs-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  section h2 {
    font-size: 26px;
    letter-spacing: 2px;
  }
}

@media (max-width: 480px) {
  .site-header .logo img {
    height: 45px;
  }
  .hero-section {
    padding: 4rem 1rem;
    min-height: 40vh;
  }
  .hero-section h1 {
    font-size: 28px;
    letter-spacing: 1px;
  }
  .hero-section p {
    font-size: 14px;
  }
  section {
    padding: 2.5rem 0;
  }
  section h2 {
    font-size: 22px;
    letter-spacing: 1px;
  }
}

/* Legal page specific */
body.legal {
  background-color: #fafafa;
  color: #333;
}
.legal-content h1 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #dd9933;
}
.legal-content h2 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  color: #dd9933;
}
.legal-content h3 {
  font-family: 'Raleway', Helvetica, Arial, sans-serif;
  font-weight: 600;
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #c4862d;
}
.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.5;
}
