/*
Theme Name: Grygor
Version: 1.0
*/

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: #fff;
  color: #023047;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.5;
}

/* --- KONTEJNER GŁÓWNY --- */
.container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* --- LEWA STRONA --- */
.left {
  width: 40%;
  padding: 100px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  z-index: 5;
  background: white;
  overflow: hidden;
}

.text {
  max-width: 520px;
}

.text a {
  color: #023047;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}

.text a:hover {
  color: #FB8500;
  text-decoration-color: #FB8500;
}

/* --- PRAWA STRONA --- */
.right {
  width: 60%;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

.right video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

/* --- LOGO --- */
.logo {
  position: absolute;
  top: 5vh;
  left: 5vw;
  height: 6vh;
  width: auto;
  display: block;
  z-index: 9999;
  cursor: pointer;
}

.logo img {
  height: 100%;
  width: auto;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

/* Wyłącz animację i podmianę na hover */
.logo-default,
.logo-hover {
  transition: none;
}

.logo-default {
  opacity: 1 !important;
  z-index: 2;
}

.logo-hover {
  opacity: 0 !important;
  z-index: 1;
  pointer-events: none;
  display: none;
}

/* Zachowuj to samo na hover (brak zmiany) */
.logo:hover .logo-default { opacity: 1 !important; }
.logo:hover .logo-hover  { opacity: 0 !important; }

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 1024px) {
  .container {
    flex-direction: column;
  }

  .left, .right {
    width: 100%;
  }

  .left {
    padding: 60px 30px;
  }

  .logo {
    top: 30px;
    left: 30px;
    height: 48px;
  }

  body {
    font-size: 26px;
  }
}

/* TELEFONY: brak scrolla; wideo dokładnie w dolnej połowie ekranu */
@media (max-width: 600px) {
  /* zablokuj przewijanie całej strony */
  html, body {
    overflow: hidden;
  }

  /* użyj siatki 1fr/1fr, aby linia podziału była dokładnie w 50% */
  .container {
    display: grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
    width: 100vw;
    height: 100vh;   /* fallback */
    height: 100dvh;  /* nowoczesne przeglądarki – dokładny wymiar ekranu */
  }

  .left, .right {
    width: 100%;
  }

  /* górna połowa (tekst) */
  .left {
    grid-row: 1;
    padding: 20px;
    height: auto;     /* wysokość kontroluje grid */
    align-items: center;
    overflow: hidden; /* brak wewnętrznego scrolla */
  }

  /* dolna połowa (wideo) */
  .right {
    grid-row: 2;
    height: auto;     /* wysokość kontroluje grid */
    position: relative;
    overflow: hidden;
  }

  .right video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;       /* wypełnia całą dolną połowę */
    object-position: center; /* bez niechcianego przesunięcia/przycięcia */
  }

  body {
    font-size: 22px;
  }

  .logo {
    top: 20px;
    left: 20px;
    height: 40px;
  }
}