/* Main CSS File for PVZ Fusion Website */

/* CSS Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Font preload and display - zapobiega przesunięciom CLS */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Montserrat Regular'), local('Montserrat-Regular'), url(https://fonts.gstatic.com/s/montserrat/v15/JTUSjIg1_i6t8kCHKm459Wlhyw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Montserrat Bold'), local('Montserrat-Bold'), url(https://fonts.gstatic.com/s/montserrat/v15/JTURjIg1_i6t8kCHKm45_dJE3gnD_g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Roboto'), local('Roboto-Regular'), url(https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu4mxK.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Zmodyfikowana paleta kolorów z lepszym kontrastem */
  --primary-color: #1E5631; /* Ciemniejszy odcień zielonego dla lepszego kontrastu */
  --primary-dark: #1e422a; /* Jeszcze ciemniejszy odcień dla hover */
  --secondary-color: #1976D2; /* Ciemniejszy niebieski */
  --accent-color: #E65100; /* Ciemniejszy pomarańczowy dla lepszego kontrastu */
  --dark-text: #212121; /* Prawie czarny */
  --body-text: #333333; /* Ciemny szary */
  --light-text: #555555; /* Średni szary - ciemniejszy niż poprzedni */
  --very-light-text: #888888; /* Jaśniejszy szary ale wystarczająco ciemny dla kontrastu */
  --background-light: #FFFFFF; /* Biały */
  --background-alt: #F5F7FA; /* Jasnoszary z niebieskim odcieniem */
  --background-hover: #ECEFF1; /* Lekko przyciemniony kolor hover */
  --error-color: #D32F2F; /* Ciemniejszy czerwony */
  --warning-color: #F57C00; /* Ciemniejszy pomarańczowy */
  --info-color: #0277BD; /* Ciemniejszy niebieski */
  
  /* Standardowe wymiary elementów */
  --header-height: 70px;
  --hero-min-height: 300px;
  --feature-card-height: 250px;
  --section-padding: 60px 0;
}

/* Definiuje przestrzeń dla czcionek przed ich załadowaniem */
html {
  font-size: 16px;
  overflow-x: hidden;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--body-text);
  background-color: var(--background-light);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* Typography z predefiniowaną wysokością linii */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5em;
  color: var(--dark-text);
  width: 100%;
}

h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 50px; /* Minimalna wysokość zapobiega przesunięciom */
}

h2 {
  font-size: 32px;
  font-weight: 600;
  position: relative;
  line-height: 1.3;
  min-height: 42px;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin-top: 8px;
}

h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 31px;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  min-height: 28px;
}

p {
  margin-bottom: 1em;
  max-width: 75ch;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* Layout Components ze stałą wysokością */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
  flex-direction: row;
  justify-content: space-around;
}

.col {
  padding: 0 15px;
  flex: 1;
}

.section {
  padding: var(--section-padding);
}

/* Header ze stałą wysokością */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--dark-text);
}

.logo span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin-left: 30px;
}

.nav-menu a {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--dark-text);
  position: relative;
  white-space: nowrap;
}

.nav-menu a.active {
  color: var(--primary-color);
}

.nav-menu a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
}

.hamburger-menu {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary-color);
}

/* Hero Section */
.hero {
    color: white;
    padding: 80px 0;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('img/PVZ-MODS.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.9);
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 12px 30px;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--background-hover);
  text-decoration: none;
  color: var(--primary-color);
}

.btn-large {
  padding: 14px 36px;
  font-size: 18px;
}

/* Feature Cards - New Design */
.feature-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    flex: 1 1 calc(50% - 20px);
    min-width: 280px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    display: flex;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    background-color: rgba(46, 139, 87, 0.1);
    color: var(--primary-color);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 20px;
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--dark-text);
    font-size: 20px;
}

.feature-content p {
    margin: 0;
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

/* Version Cards ze stałymi wymiarami */
.version-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.version-card {
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  padding: 20px;
  background-color: white;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: var(--feature-card-height);
}

.version-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.version-card h4 {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.version-card .version-date {
  font-size: 12px;
  color: var(--light-text);
  margin-bottom: 15px;
}

.version-card ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.version-card .latest {
  border-color: gold;
}

/* Obrazy ze stałymi wymiarami */
img {
  display: block;
  width: 100%; 
  height: auto;
  max-width: 100%;
}

/* Jeśli obraz ma być ładowany z opóźnieniem */
img[data-src] {
  min-height: 100px; /* Minimalna wysokość zanim obraz się załaduje */
  background-color: #f0f0f0; /* Tło zanim obraz się załaduje */
}

/* Przypisanie aspect-ratio do klas obrazów */
.feature-image {
  aspect-ratio: 16 / 9;
}

.profile-image {
  aspect-ratio: 1 / 1;
}

.banner-image {
  aspect-ratio: 21 / 9;
}

/* CTA Section Styles */
.cta-section {
  background-color: var(--primary-dark);
  color: white;
  text-align: center;
  padding: var(--section-padding);
  width: 100%;
}

.cta-section h2 {
  color: white;
  margin-bottom: 20px;
}

.cta-section h2::after {
  background-color: white;
  margin: 15px auto 0;
}

.cta-section p {
  margin: 0 auto 30px;
  max-width: 600px;
  color: rgba(255, 255, 255, 0.9);
}

.cta-section .btn {
  background-color: white;
  color: var(--primary-dark);
  border: 2px solid white;
  font-weight: 600;
  min-width: 200px;
}

.cta-section .btn:hover {
  background-color: transparent;
  color: white;
}

/* Reszta CSS bez zmian... */

/* Responsive Styles ze stałymi wymiarami */
@media (max-width: 768px) {
  :root {
    --hero-min-height: 250px;
    --feature-card-height: 220px;
    --section-padding: 50px 0;
  }
  
  h1 {
    font-size: 32px;
    min-height: 38px;
  }
  
  h2 {
    font-size: 26px;
    min-height: 34px;
  }
  
  .nav-menu {
    display: none;
  }
  
  .hamburger-menu {
    display: block;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  /* Responsive Navigation Menu */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: white;
    flex-direction: column;
    padding: 70px 20px 20px;
    transition: all 0.5s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    opacity: 0;
    visibility: hidden;
  }
  
  .nav-menu.active {
    right: 0;
    opacity: 1;
    visibility: visible;
  }
  
  .nav-menu li {
    margin: 0 0 15px 0;
  }
  
  .nav-menu a {
    display: block;
    padding: 10px 0;
    font-size: 16px;
  }
  
  /* Close button for mobile menu */
  .nav-menu::before {
    content: "×";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--primary-color);
  }
  
  /* Footer improvements */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 576px) {
  :root {
    --hero-min-height: 180px;
    --feature-card-height: 180px;
    --section-padding: 30px 0;
    --header-height: 50px;
  }
  
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 24px;
    min-height: 28px;
  }
  
  h2 {
    font-size: 22px;
    min-height: 28px;
  }
  
  h3 {
    font-size: 18px;
    min-height: 23px;
  }
  
  .container {
    padding: 0 15px;
  }
  
  .btn-large {
    width: 100%;
    max-width: 200px;
  }
  
  .hero {
    padding: 50px 0;
    min-height: 200px;
  }
  
  .hero h1 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 15px;
  }
  
  .feature-card,
  .version-card {
    padding: 15px;
  }
}

/* Pixel 7 and similar devices specific fixes */
@media (max-width: 412px) {
  .feature-icon {
    width: 50px;
    height: 50px;
  }
  
  /* Prevent text overflow in headers */
  h1, h2, h3, h4 {
    word-break: break-word;
  }
  
  /* Buttons better suited for small screens */
  .btn {
    padding: 8px 20px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 15px;
    }
    
    .feature-content h3 {
        font-size: 18px;
    }
    
    .feature-content p {
        font-size: 14px;
    }
}