/* header-footer.css - Style dla nagłówka i stopki YourPT */

/* ==========================================================
   NAGŁÓWEK (HEADER) - NOWA STRUKTURA
   ========================================================== */

/* Header Styles - GRADIENT ODWRÓCONY */
.header {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  color: white;
  width: 100%;
}

/* ==========================================================
   SEKCJA 1: IKONY
   ========================================================== */

.icons-section {
  height: 5rem; /* Więcej miejsca dla flag */
  position: relative;
  width: 100%;
}

.menu-icons {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  display: flex;
  gap: 0.7rem;
  z-index: 5;
}

/* Language Section - osobny kontener z większym paddingiem */
.language-section {
  position: absolute;
  top: 3.2rem; /* Większy odstęp od ikon */
  right: 1rem;
  padding-top: 0.4rem; /* Dodatkowa przestrzeń */
  z-index: 5;
}

/* Language Switcher - w osobnym obszarze pod ikonami */
.language-switcher {
  display: flex;
  flex-direction: row; /* POZIOMO */
  gap: 0.8rem;
}

.flag-icon {
  width: 35px;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  opacity: 0.7;
  border: 2px solid transparent;
}

.flag-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

.flag-icon.active {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.5));
}

.icon {
  width: 25px;
  height: 25px;
  cursor: pointer;
  transition: transform var(--animation-speed);
}

.icon:hover {
  transform: scale(1.1);
}

/* ==========================================================
   SEKCJA 2: CONTENT (LOGO + TYTUŁ + SLOGAN)
   ========================================================== */

.content-section {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
}

/* Logo container */
.logo-container {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 10px;
  max-width: 100%;
}

.logo-wrapper {
  position: relative;
  margin-right: 15px;
  flex-shrink: 0;
}

/* LOGO POWIĘKSZONE DO 140px */
.logo {
  height: 140px;
  width: auto;
  position: relative;
  z-index: 1;
}

/* Efekt świecenia wokół logo (zimne ognie) */
.logo-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  filter: blur(5px);
  opacity: 0;
  animation: glow 3s infinite alternate;
  z-index: 0;
  pointer-events: none;
}

@keyframes glow {
  0% {
    opacity: 0.2;
    transform: scale(1);
  }
  100% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* Kontener tytułu */
.title-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: calc(100% - 90px);
}

.title {
  font-size: 1.8rem;
  margin: 0;
  white-space: normal;
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
}

/* Animacja sekwencyjnego zapalania segmentów */
.title-segments {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  display: flex;
  overflow: hidden;
}

.title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: rgba(220, 220, 220, 0.5);
}

/* Animacja, która generuje zapalające się segmenty */
.title-segment {
  position: absolute;
  bottom: 0;
  height: 3px;
  width: 20%;
  opacity: 0;
}

.title-segment-1 {
  left: 0%;
  background-color: var(--quick-tools);
  animation: segmentLight 5s infinite;
  animation-delay: 0s;
}

.title-segment-2 {
  left: 20%;
  background-color: var(--advanced-tools);
  animation: segmentLight 5s infinite;
  animation-delay: 0.5s;
}

.title-segment-3 {
  left: 40%;
  background-color: var(--professional-tools);
  animation: segmentLight 5s infinite;
  animation-delay: 1s;
}

.title-segment-4 {
  left: 60%;
  background-color: var(--expert-tools);
  animation: segmentLight 5s infinite;
  animation-delay: 1.5s;
}

.title-segment-5 {
  left: 80%;
  background-color: var(--contact-color);
  animation: segmentLight 5s infinite;
  animation-delay: 2s;
}

@keyframes segmentLight {
  0%, 20% {
    opacity: 0;
    box-shadow: none;
  }
  30%, 80% {
    opacity: 1;
    box-shadow: 0 0 5px currentColor;
  }
  90%, 100% {
    opacity: 0;
    box-shadow: none;
  }
}

.slogan {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  max-width: 100%;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

/* ==========================================================
   STOPKA (FOOTER)
   ========================================================== */

.footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3.5rem 1rem 2rem; /* Więcej góry dla flag */
  width: 100%;
  position: relative;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end; /* Wyrównanie do dołu */
}

/* LEWA KOLUMNA */
.footer-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1rem; /* Podnoszę całą lewą kolumnę */
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-company-info {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.9;
  min-height: 20px; /* Zmniejszone */
}

.footer-copyright {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0;
}

/* PRAWA KOLUMNA */
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.2rem; /* Większa przerwa jak było */
  position: relative;
}

/* Flagi w footerze - na górze po prawej POZIOMO */
.footer-language-switcher {
  position: absolute;
  top: -60px; /* Bliżej ikon */
  right: 0;
  display: flex;
  flex-direction: row; /* POZIOMO */
  gap: 0.8rem;
}

.footer-flag-icon {
  width: 32px;
  height: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.footer-flag-icon:hover {
  opacity: 1;
  transform: scale(1.05);
}

.footer-flag-icon.active {
  opacity: 1;
  transform: scale(1.15);
  filter: drop-shadow(0 4px 8px rgba(255, 255, 255, 0.5));
}

/* Brand wyżej - na poziomie flag */
.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  margin-top: -2rem; /* Podnoszę wyżej */
}

/* Social media w footerze - pod flagami */
.footer-social {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 0.5rem;
}

.footer-social-icon {
  width: 25px;
  height: 25px;
  cursor: pointer;
  transition: transform 0.3s ease;
  opacity: 0.9;
}

.footer-social-icon:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Linki do polityk - na poziomie copyright */
.footer-links {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-separator {
  color: white;
  opacity: 0.5;
}

/* ==========================================================
   RESPONSIVE - FOOTER
   ========================================================== */

@media (max-width: 768px) {
  .footer {
    padding: 2rem 1rem 1.5rem;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Prawa kolumna NAD lewą */
  .footer-right {
    order: -1;
    align-items: center;
    position: relative;
    gap: 1.5rem; /* Jak było */
  }
  
  /* Flagi w stopce na mobile - nie absolute */
  .footer-language-switcher {
    position: relative;
    top: 0;
    right: 0;
    flex-direction: row;
    gap: 0.8rem;
  }
  
  .footer-left {
    align-items: center;
    text-align: center;
    padding-top: 0;
  }
  
  .footer-brand {
    font-size: 1.3rem;
    margin-top: 0; /* Bez przesunięcia na mobile */
  }
  
  /* Linki w jednej linii na mobile */
  .footer-links {
    flex-direction: row;
    gap: 0.8rem;
    text-align: center;
  }
  
  .footer-social-icon {
    width: 25px;
  }
  
  .footer-flag-icon {
    width: 32px;
  }
}

/* ==========================================================
   MODAL Z YOUTUBE
   ========================================================== */

/* Kontener dla przycisków na dole modalu */
.modal-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

/* Przycisk YouTube */
.youtube-button {
  background-color: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: transform var(--animation-speed);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-color);
}

.youtube-button:hover {
  transform: scale(1.05);
}

.youtube-button:active {
  transform: scale(0.95);
}

/* Ikona YouTube w przycisku */
.youtube-button .icon {
  width: 20px;
  height: 20px;
}

/* Przycisk Close */
.close-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--animation-speed);
}

.close-button:hover {
  background-color: var(--secondary-color);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Media query dla urządzeń mobilnych */
@media (max-width: 768px) {
  .icons-section {
    height: 4.5rem;
  }
  
  .content-section {
    padding: 1rem;
  }
  
  .logo {
    height: 100px;
  }
  
  .title {
    font-size: 1.6rem;
  }
  
  .slogan {
    font-size: 0.85rem;
  }
  
  .menu-icons {
    top: 0.8rem;
    right: 0.8rem;
  }
  
  .language-section {
    top: 3.2rem; /* Większy odstęp od ikon */
    right: 0.8rem;
    padding-top: 0.4rem;
  }
  
  .icon {
    width: 25px;
    height: 25px;
  }
  
  .flag-icon {
    width: 32px;
  }
  
  /* Modal buttons na mobile - zawsze obok siebie */
  .modal-buttons {
    gap: 0.5rem;
  }
}

/* Media query dla tabletów */
@media (min-width: 768px) and (max-width: 1023px) {
  .content-section {
    padding: 1.5rem;
  }
  
  .logo {
    height: 90px;
  }
  
  .title {
    font-size: 2rem;
    white-space: nowrap;
  }
  
  .slogan {
    font-size: 1rem;
  }
  
  /* Ikony normalne 25px na tablet */
  .icon {
    width: 25px;
    height: 25px;
  }
  
  .flag-icon {
    width: 32px;
  }
}

/* Media query dla desktopów */
@media (min-width: 1024px) {
  .content-section {
    padding: 1.8rem;
  }
  
  .logo {
    height: 140px;
  }
  
  .title {
    font-size: 2.2rem;
    white-space: nowrap;
  }
  
  .slogan {
    font-size: 1.1rem;
    max-width: 80%;
  }
  
  /* Ikony normalne 25px na desktop */
  .icon {
    width: 25px;
    height: 25px;
  }
  
  .flag-icon {
    width: 32px;
  }
}