/* Responsive Styles - Mobile First */

/* Tablet and below (768px) */
@media (max-width: 767px) {
  /* Typography */
  :root {
    --font-size-h1: 28px;
    --font-size-h2: 24px;
    --font-size-h3: 20px;
  }

  /* Header */
  .nav {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--color-bg);
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 12px var(--color-shadow);
    transition: left var(--transition-speed);
    align-items: flex-start;
  }

  .nav.active {
    left: 0;
  }

  .nav-link {
    width: 100%;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
  }

  .header .contact-phone {
    display: none;
  }

  .nav .contact-phone {
    display: block;
    margin-left: 0;
    margin-top: var(--spacing-md);
    font-size: var(--font-size-base);
  }

  .mobile-menu-toggle {
    display: block;
  }

  /* MasterTherm obrázek na mobilu */
  .mt-teaser-pic {
    float: none;
    max-width: 100%;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--spacing-md);
  }

  /* Hero */
  .hero {
    height: 300px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: var(--font-size-base);
  }

  /* Hero Slider Layers - Scale for mobile */
  .slide-layers {
    transform: translateX(-50%) scale(0.4);
    left: 30%;
    transform-origin: center center;
  }

  .slide-title {
    font-size: 1.8em;
  }

  .hero-content-simple {
    padding: var(--spacing-md);
  }

  .hero-content-simple h1 {
    font-size: 24px;
  }

  .hero-content-simple p {
    font-size: var(--font-size-base);
  }

  /* Hero CTA - Mobile */
  .hero-cta .cta-content {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }

  .hero-cta .cta-text h2 {
    font-size: var(--font-size-h3);
  }

  .hero-cta .cta-text p {
    font-size: var(--font-size-small);
  }

  .hero-cta .cta-button {
    width: 100%;
    padding: 14px 28px;
  }

  /* Home Concept - adjust for mobile */
  .home-concept {
    min-height: auto;
    background-size: cover;
    padding: var(--spacing-lg) 0;
  }

  .concept-row {
    min-height: auto;
  }

  .concept-sun {
    width: 40px;
    height: 37px;
    background-size: auto 37px;
    left: 5%;
    top: 20px;
  }

  .concept-cloud {
    width: 75px;
    height: 37px;
    background-size: 490px 37px;
    right: 5%;
    top: 20px;
  }

  .concept-process {
    flex-direction: column;
    gap: 0;
    padding-top: 80px;
    align-items: center;
  }

  .process-item {
    width: 180px;
    margin-top: 80px;
    padding-bottom: 30px;
  }

  .process-item strong {
    font-size: 1.3em;
  }

  .process-item p {
    font-size: 0.9em;
    padding: 0 var(--spacing-xs);
    line-height: 1.3;
  }

  .process-item-result {
    width: 180px;
    height: auto;
    margin-left: 0;
    margin-top: 80px;
    padding-bottom: 30px;
    background: url(../images/home-concept-item.png) no-repeat 0 0;
  }

  .process-item-result strong {
    margin-top: var(--spacing-md);
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .slider-arrow.prev {
    left: 10px;
  }

  .slider-arrow.next {
    right: 10px;
  }

  /* Sections */
  section {
    padding: var(--spacing-xl) 0;
  }

  /* Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  /* Process */
  .process-steps {
    grid-template-columns: 1fr;
  }

  /* Services */
  .services-benefits {
    grid-template-columns: 1fr;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .stat-number {
    font-size: 36px;
  }

  /* Portfolio */
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* Contact */
  .contact-content {
    grid-template-columns: 1fr;
  }

  .contact-map iframe {
    height: 300px;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  /* Lightbox */
  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

/* Small mobile (320px - 479px) */
@media (max-width: 479px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .hero {
    height: 250px;
  }

  .hero-content h1 {
    font-size: 24px;
  }

  .slide-layers {
    transform: translateX(-50%) scale(0.3);
    left: 50%;
  }

  .slide-title {
    font-size: 1.3em;
    line-height: 1.2;
  }

  .hero-content-simple h1 {
    font-size: 20px;
  }

  .hero-content-simple p {
    font-size: var(--font-size-small);
  }

  .btn {
    padding: 12px 24px;
    font-size: var(--font-size-small);
  }

  /* Hero CTA nadpis zmenšit */
  .hero-cta .cta-text h2 {
    font-size: 18px;
    line-height: 1.3;
    word-break: break-word;
  }

  .feature-box {
    padding: var(--spacing-sm);
  }

  .process-step,
  .stat-box {
    padding: var(--spacing-md);
  }

  /* Stat number zmenšit */
  .stat-number {
    font-size: 28px;
  }

  /* Lightbox controls zvětšit */
  .lightbox-close {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Portfolio obrázky menší výška */
  .portfolio-item img {
    height: 180px;
  }

  .logo {
    height: 40px;
  }

  /* Simplify on very small screens */
  .home-concept {
    background-size: 150%;
    min-height: auto;
    padding: var(--spacing-md) 0;
  }

  .concept-process {
    padding-top: 60px;
    gap: 0;
  }

  .process-item {
    background-size: 180px auto;
    width: 180px;
    margin-top: 60px;
    padding-bottom: 30px;
  }

  .process-item img {
    width: 160px;
    height: 160px;
    margin: 10px 10px;
    border-radius: 120px;
  }

  /* Process-item-result stejná velikost jako ostatní */
  .process-item-result {
    background-size: 180px auto;
    width: 180px;
    margin-top: 60px;
    margin-left: 0;
    padding-bottom: 30px;
  }

  .process-item-result img {
    width: 160px;
    height: 160px;
    margin: 10px auto;
    border-radius: 120px;
  }

  .process-item strong {
    font-size: 1.3em;
    margin-top: var(--spacing-sm);
  }

  .process-item p {
    font-size: 0.9em;
    padding: 0 var(--spacing-xs);
    line-height: 1.3;
  }

  .process-item-result {
    background-size: 200px auto;
    width: 200px;
    height: auto;
    padding-bottom: 25px;
  }

  .process-item-result img {
    width: 175px;
    height: 175px;
    margin: 8px auto 12px;
    border-radius: 120px;
  }

  .process-item-result strong {
    margin-top: var(--spacing-sm);
  }

  .concept-sun,
  .concept-cloud {
    display: none;
  }
}

/* Tablet (768px - 979px) */
@media (min-width: 768px) and (max-width: 979px) {
  .hero {
    height: 370px;
  }

  .slide-layers {
    transform: translateX(-50%) scale(0.6);
    left: 50%;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop (980px and up) */
@media (min-width: 980px) {
  .container {
    padding: 0 var(--spacing-lg);
  }

  .hero {
    height: 435px;
  }

  .slide-layers {
    transform: translateX(-50%) scale(0.85);
    left: 50%;
  }

  .hero-content h1 {
    font-size: 56px;
  }

  /* Home Concept - larger on desktop */
  .home-concept {
    min-height: 500px;
    padding: var(--spacing-xxl) 0;
  }

  .concept-row {
    min-height: 420px;
  }

  .concept-sun {
    width: 60px;
    height: 56px;
    background-size: auto 56px;
    left: 12%;
    top: 35px;
  }

  .concept-cloud {
    width: 116px;
    height: 56px;
    background-size: 752px 56px;
    right: 12%;
    top: 35px;
  }

  .concept-process {
    flex-direction: row;
    gap: var(--spacing-lg);
    padding-top: 0;
  }

  .process-item {
    background: url('../images/home-concept-item.png') no-repeat 0 0;
    width: 160px;
    margin-top: 135px;
    padding-bottom: 50px;
  }

  .process-item:nth-child(1),
  .process-item:nth-child(2),
  .process-item:nth-child(3) {
    margin-right: var(--spacing-md);
  }

  .process-item img {
    width: 145px;
    height: 145px;
    margin: 7px 8px;
  }

  .process-item strong {
    font-size: 1.8em;
  }

  .process-item p {
    font-size: var(--font-size-base);
  }

  .process-item-result {
    background: url('../images/home-concept-item.png') no-repeat 100% 0;
    width: 350px;
    height: auto;
    margin-top: 55px;
    margin-left: -30px;
    padding-bottom: 45px;
  }

  .process-item-result img {
    width: 330px;
    height: 330px;
    margin: 10px auto 10px;
    border-radius: 200px;
  }

  .process-item-result strong {
    margin-top: var(--spacing-xl);
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Large desktop (1200px and up) */
@media (min-width: 1200px) {
  :root {
    --font-size-h1: 42px;
    --font-size-h2: 36px;
    --font-size-h3: 28px;
  }

  .hero {
    height: 435px;
  }

  .slide-layers {
    transform: translateX(-50%) scale(1);
    left: 50%;
  }
}

/* Touch device optimizations */
@media (hover: none) {
  .feature-box:hover,
  .portfolio-item:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .header,
  .hero,
  .slider-controls,
  .slider-arrow,
  .mobile-menu-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
  }

  section {
    page-break-inside: avoid;
  }
}
