/* main.css - Główne style dla strony YourPT (v0.7) - UNIFIED CONTAINERS */

/* ==========================================================
   ZMIENNE CSS
   ========================================================== */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --animation-speed: 0.3s;
  
  /* Kolory dla sekcji */
  --quick-tools: #8ED1A4; /* Jasnozielony */
  --advanced-tools: #FFD966; /* Jasnożółty */
  --professional-tools: #FFAF7A; /* Jasnopomarańczowy */
  --expert-tools: #FF9A9A; /* Jasnoczerwony */
  --contact-color: #D7A9FF; /* Jasno purpurowy */
  
  /* ==========================================================
     UNIFIED CONTAINER SYSTEM - NOWE ZMIENNE
     ========================================================== */
  --container-max-width-mobile: 100%;
  --container-max-width-tablet: 750px;
  --container-max-width-desktop: 900px;
  --container-max-width-large: 1100px;
  
  --container-padding-mobile: 1rem;
  --container-padding-tablet: 1.5rem;
  --container-padding-desktop: 2rem;
  
  --section-spacing-mobile: 1.5rem;
  --section-spacing-tablet: 2rem;
  --section-spacing-desktop: 2.5rem;
  
  /* Unified border-radius system */
  --border-radius-small: 4px;
  --border-radius-medium: 8px;
  --border-radius-large: 10px;
  --border-radius-xl: 12px;
}

/* ==========================================================
   PODSTAWOWE STYLE
   ========================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Oxygen', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-color);
  background-color: var(--light-bg);
  overflow-x: hidden;
  width: 100%;
}

.App {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: fadeIn 0.8s ease-in;
  width: 100%;
  overflow-x: hidden;
}

/* ==========================================================
   UNIFIED CONTAINER SYSTEM
   ========================================================== */

/* Główny kontener - używany we wszystkich sekcjach */
.main-container {
  max-width: var(--container-max-width-mobile);
  margin: 0 auto;
  padding: 0 var(--container-padding-mobile);
  width: 100%;
}

/* Warianty kontenerów dla specjalnych przypadków */
.container-narrow {
  max-width: calc(var(--container-max-width-tablet) - 100px);
}

.container-wide {
  max-width: var(--container-max-width-large);
}

/* Unified responsive breakpoints */
@media (min-width: 768px) {
  .main-container {
    max-width: var(--container-max-width-tablet);
    padding: 0 var(--container-padding-tablet);
  }
}

@media (min-width: 1024px) {
  .main-container {
    max-width: var(--container-max-width-desktop);
    padding: 0 var(--container-padding-desktop);
  }
}

@media (min-width: 1440px) {
  .main-container {
    max-width: var(--container-max-width-large);
  }
}

/* ==========================================================
   SEKCJA PROJECTS - UPDATED
   ========================================================== */
.projects-section {
  background-color: rgba(52, 152, 219, 0.1);
  border-top: 1px solid rgba(52, 152, 219, 0.2);
  border-bottom: 1px solid rgba(52, 152, 219, 0.2);
  padding: var(--section-spacing-mobile) 0;
  text-align: center;
  width: 100%;
}

.projects-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.project-button {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: transform var(--animation-speed), box-shadow var(--animation-speed);
  position: relative;
  overflow: hidden;
  min-width: 120px;
  flex: 1;
  max-width: 200px;
}

.project-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transform: scale(0.5);
  animation: projectButtonGlow 2s infinite alternate;
}

@keyframes projectButtonGlow {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

.project-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.project-button.active {
  background: linear-gradient(135deg, #2980b9, #1f618d);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.projects-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s ease-out, padding 0.8s ease-out, margin 0.8s ease-out;
  background-color: white;
  margin: 0 auto;
  border-radius: var(--border-radius-medium);
  padding: 0;
  width: 100%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.projects-content.expanded {
  max-height: 80vh; /* Zwiększone z 450px na 80% wysokości ekranu */
  padding: 0; /* Usunięte padding - będzie w iframe */
  margin-top: 0.8rem;
}

.projects-iframe {
  width: 100%;
  height: 75vh; /* Zwiększone z 400px na 75% wysokości ekranu */
  min-height: 500px; /* Minimalna wysokość */
  border: none;
  border-radius: var(--border-radius-small);
  background-color: #f5f5f5;
  display: block; /* Zapewnia poprawne wyświetlanie */
}

/* ==========================================================
   SEKCJA FUNKCJI - UPDATED
   ========================================================== */
.features-section {
  padding: var(--section-spacing-mobile) 0;
  flex-grow: 1;
  width: 100%;
}

.category-wrapper {
  background-color: white;
  border-radius: var(--border-radius-large);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 100%;
}

.category-header {
  color: var(--primary-color);
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
  padding-bottom: 0.5rem;
  position: relative;
  border-bottom: none;
}

.category-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
}

.category-description {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  width: 100%;
}

.feature-tile {
  background-color: #f8f9fa;
  border-radius: var(--border-radius-medium);
  padding: 0.8rem;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: transform var(--animation-speed), box-shadow var(--animation-speed);
  border: 1px solid #eee;
  width: 100%;
}

.feature-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: var(--secondary-color);
}

.feature-icon {
  width: 32px;
  height: 32px;
  margin-right: 0.8rem;
  flex-shrink: 0;
}

.feature-name {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-color);
}

/* Różne kolory kategorii */
.category-wrapper:nth-child(1) .category-header::after {
  background-color: var(--quick-tools);
}

.category-wrapper:nth-child(2) .category-header::after {
  background-color: var(--advanced-tools);
}

.category-wrapper:nth-child(3) .category-header::after {
  background-color: var(--professional-tools);
}

.category-wrapper:nth-child(4) .category-header::after {
  background-color: var(--expert-tools);
}

/* ==========================================================
   SEKCJA DOWNLOAD & INFORMATION - UPDATED
   ========================================================== */
.download-info-section {
  background-color: rgba(52, 152, 219, 0.1);
  border-top: 1px solid rgba(52, 152, 219, 0.2);
  border-bottom: 1px solid rgba(52, 152, 219, 0.2);
  padding: var(--section-spacing-mobile) 0;
  text-align: center;
  width: 100%;
}

.download-info-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.info-item {
  margin-bottom: 1rem;
  text-align: left;
}

.info-item h3 {
  color: var(--primary-color);
  font-size: 1rem;
  margin: 0 0 0.3rem;
  font-weight: 600;
}

.info-item p {
  color: #666;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

.info-item a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 500;
}

.info-item a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.download-button-container {
  margin-top: 1.5rem;
  text-align: center;
}

.download-button {
  background: url('../graphics/button.png') no-repeat center center;
  background-size: cover;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  font-size: 1.2rem;
  font-weight: bold;
  border-radius: var(--border-radius-medium);
  cursor: pointer;
  transition: transform var(--animation-speed);
  min-width: 220px;
  min-height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  animation: pulse 2s infinite;
  margin: 0 auto;
}

.download-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transform: scale(0.5);
  animation: downloadGlow 2s infinite alternate;
}

@keyframes downloadGlow {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
}

.download-button:hover {
  transform: scale(1.05);
  animation: none;
}

/* ==========================================================
   MODAL
   ========================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
  padding: 0 10px;
}

.modal-content {
  background-color: white;
  padding: 1.2rem;
  border-radius: var(--border-radius-medium);
  max-width: 95vw;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.modal-content h2 {
  margin-bottom: 1rem;
  color: var(--primary-color);
  font-size: 1.3rem;
}

.modal-content p {
  line-height: 1.5;
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}

/* ==========================================================
   ANIMACJE
   ========================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
  }
}

/* Utility class */
.show-modal {
  display: flex !important;
}

/* ==========================================================
   UNIFIED RESPONSIVE SYSTEM
   ========================================================== */

/* Tablety i większe telefony (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --section-spacing-mobile: var(--section-spacing-tablet);
  }
  
  body {
    font-size: 16px;
  }
  
  .category-wrapper {
    padding: 1.5rem;
  }
  
  .category-header {
    font-size: 1.4rem;
  }
  
  .feature-icon {
    width: 36px;
    height: 36px;
  }
  
  .modal-content {
    max-width: 70vw;
    padding: 1.5rem;
  }
  
  .features-grid {
    display: flex;
    flex-direction: column;
  }
  
  .projects-buttons {
    gap: 0.8rem;
  }
  
  .project-button {
    min-width: 130px;
  }
  
  /* Lepsze wsparcie dla iframe na tabletach */
  .projects-content.expanded {
    max-height: 85vh;
  }
  
  .projects-iframe {
    height: 80vh;
    min-height: 600px;
  }
}

/* Desktopy i większe ekrany (1024px+) */
@media (min-width: 1024px) {
  :root {
    --section-spacing-mobile: var(--section-spacing-desktop);
  }
  
  body {
    font-size: 16px;
  }
  
  .category-wrapper {
    padding: 1.8rem;
  }
  
  .category-header {
    font-size: 1.5rem;
  }
  
  .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }
  
  .feature-icon {
    width: 42px;
    height: 42px;
  }
  
  .modal-content {
    max-width: 600px;
    padding: 2rem;
  }
  
  .projects-buttons {
    gap: 1.5rem;
  }
  
  .project-button {
    min-width: 150px;
    padding: 0.6rem 1rem;
  }
  
  /* Optymalny rozmiar dla desktop */
  .projects-content.expanded {
    max-height: 90vh;
  }
  
  .projects-iframe {
    height: 85vh;
    min-height: 700px;
  }
}

/* Bardzo duże ekrany (1440px+) */
@media (min-width: 1440px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-content {
    max-width: 700px;
  }
  
  /* Maksymalny rozmiar dla bardzo dużych ekranów */
  .projects-content.expanded {
    max-height: 85vh;
  }
  
  .projects-iframe {
    height: 80vh;
    min-height: 750px;
  }
}

/* Małe urządzenia mobilne (480px i mniej) */
@media (max-width: 480px) {
  .project-button {
    min-width: 100px;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .projects-buttons {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  /* Dostosowanie dla małych ekranów */
  .projects-content.expanded {
    max-height: 70vh;
  }
  
  .projects-iframe {
    height: 65vh;
    min-height: 400px;
  }
  
  .category-wrapper {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .feature-tile {
    padding: 0.6rem;
  }
  
  .feature-icon {
    width: 28px;
    height: 28px;
    margin-right: 0.6rem;
  }
}