/* Mobile adaptation rules */

/* Hide mobile toggle by default */
.mobile-nav-toggle{
  display:none;
  border:0;
  background:transparent;
  color:var(--accent);
  font-size:22px;
  padding:8px;
  cursor:pointer;
}

/* Tablets and small desktops */
@media (max-width:1024px){
  :root{
    --fontsize: 16px;
    --biggerfontsize: 20px;
    --borderradius: 30px;
  }

  .container{
    padding: 20px;
  }

  /* About section */
  #about{
    flex-direction: column;
    gap: 30px;
  }
  .l-col, .r-col{
    width: 100%;
  }

  /* Products section */
  .mi_proizvodim{
    flex-direction: column;
    gap: 30px;
  }
  .mi_left, .mi_right{
    width: 100%;
  }

  /* Projects section */
  .projects-content{
    flex-direction: column;
    gap: 30px;
  }
  .projects-left, .projects-right{
    width: 100%;
  }
}

@media (max-width:880px){
  /* Header layout */
  .header-inner{
    display:flex;
    align-items:center;
    gap:12px;
    position:relative;
    padding: 12px 0;
  }
  
  .logo{
    display:flex;
    align-items:center;
    gap:10px;
  }

  .logo-mark{
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .logo-image img{
    max-width: 48px;
  }

  .logo-text h1{
    font-size: 16px;
  }

  .tagline{
    font-size: 11px;
  }

  /* show burger */
  .mobile-nav-toggle{
    display:inline-flex;
    margin-left:auto;
  }

  /* hide desktop contacts to save space */
  .header-contacts{
    display:none;
  }

  /* Mobile nav dropdown */
  .main-nav{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:64px;
    background:#fff;
    border-top:4px solid var(--accent);
    box-shadow:0 10px 30px rgba(0,0,0,0.12);
    z-index:1200;
    padding:12px 18px;
  }
  .main-nav.mobile-open{
    display:flex;
  }
  .main-nav ul{
    flex-direction:column;
    gap:8px;
    width: 100%;
  }
  .main-nav a{
    display:block;
    padding:10px 12px;
    color:#222;
    border-radius:6px;
  }
  .main-nav a:hover{
    background:rgba(0,0,0,0.04);
  }

  /* Hero section */
  .hero{
    padding:40px 0;
  }

  .hero-inner{
    padding: 30px 20px;
  }

  .hero-left h2{
    font-size: 28px;
    margin-bottom: 16px;
  }

  .hero-left p{
    font-size: 16px;
  }

  .hero-services li{
    font-size: 15px;
  }

  .cta{
    flex-wrap: wrap;
  }

  .btn{
    font-size: 14px;
    padding: 10px 16px;
  }

  /* Since badge */
  .since{
    position: static;
    display: block;
    margin: 20px 0;
    padding: 10px 20px;
    font-size: 16px;
  }

  .since b{
    font-size: 18px;
  }

  /* Section headings */
  .section h3{
    font-size: 36px;
    margin-bottom: 20px;
  }

  /* Products list */
  .mi_right .products-list li{
    width: 100%;
    font-size: 14px;
  }

  .mi_right h4{
    font-size: 20px;
    margin-bottom: 16px;
  }

  /* Advantages grid */
  .grid-2{
    grid-template-columns: 1fr;
  }

  .adv{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .adv-icon{
    width: 60px;
    height: 60px;
  }

  .adv-content h4{
    font-size: 20px;
  }

  .adv-content p{
    font-size: 15px;
  }

  /* Individual approach section */
  .individual-approach{
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 0;
    border-bottom: none;
  }

  .individual-approach img{
    height: 40px;
  }

  .approach-block h3{
    font-size: 24px;
  }

  .approach-block p{
    font-size: 18px;
  }

  /* Approach arrow rotation – 90 degrees down */
  img[src*="white_arrow.png"]{
    transform:rotate(90deg);
    width: 20px;
    height: auto;
  }

  /* Steps become columnar */
  .steps-row{
    flex-direction:column;
    align-items:center;
    gap:10px;
  }

  .step-item{
    width:100%;
    display:flex;
    flex-direction:column;
    align-items:center;
  }

  .step-item .step{
    display:block;
    text-align:center;
    font-size: 14px;
    padding: 10px 16px;
  }

  .step-download-btn{
    margin-top:8px;
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Product cards */
  .prod_content{
    flex-direction:column;
  }

  .prod_card_left, .prod_card_right{
    width:100%;
    border-radius: 20px;
    padding: 20px;
  }

  .prod_card_left{
    border-radius: 20px 20px 0 0;
  }

  .prod_icon-circle{
    position: static;
    margin: 0 auto 16px;
    width: 70px;
    height: 70px;
  }

  .prod_card_left p{
    margin: 10px 0 0 0;
  }

  .products_detail-section .prod_card h3{
    font-size: 24px;
    margin-bottom: 16px;
  }

  /* Projects stats */
  .projects-num a{
    font-size: 36px;
  }

  .projects-stat-text{
    font-size: 15px;
  }

  .projects-description p{
    font-size: 14px;
  }

  .projects-clients-bg p{
    font-size: 15px;
  }

  /* Contact section */
  .contact-wrapper{
    flex-direction: column;
    gap: 30px;
  }

  .contact-content{
    min-width: auto;
  }

  .contact-section address{
    font-size: 16px;
    padding: 30px 20px;
    border-radius: 30px;
  }

  /* Upload form */
  #uploadForm{
    width:100%;
    max-width: 100% !important;
  }

  #uploadForm .dropzone{
    width:100%;
    padding: 20px 16px;
    font-size: 14px;
  }

  #uploadForm #submitBtn{
    padding: 10px 16px;
    font-size: 14px;
  }

  /* Back to top button */
  #back-to-top, .back-to-top{
    right: 16px;
    bottom: 20px;
    width: 42px;
    height: 42px;
  }
}

@media (max-width:600px){
  :root{
    --fontsize: 15px;
    --biggerfontsize: 18px;
  }

  .container{
    padding: 16px;
  }

  /* Header */
  .logo-mark, .logo-image img{
    width: 40px;
    height: 40px;
  }

  .logo-text h1{
    font-size: 14px;
  }

  .tagline{
    font-size: 10px;
  }

  /* Hero */
  .hero{
    padding: 30px 0;
  }

  .hero-inner{
    padding: 20px 16px;
  }

  .hero-left h2{
    font-size: 22px;
    line-height: 1.2;
  }

  .hero-left p{
    font-size: 14px;
  }

  .hero-services li{
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-features li{
    font-size: 14px;
  }

  .stat .num a{
    font-size: 32px;
  }

  /* Buttons */
  .btn{
    font-size: 13px;
    padding: 9px 14px;
  }

  .btn-primary, .btn-ghost{
    width: 100%;
    text-align: center;
  }

  .cta{
    flex-direction: column;
    width: 100%;
  }

  /* Sections */
  .section{
    padding: 30px 0;
  }

  .section h3{
    font-size: 28px;
    margin-bottom: 16px;
  }

  /* About */
  .since{
    font-size: 14px;
    padding: 8px 16px;
  }

  .since b{
    font-size: 16px;
  }

  #about h4{
    font-size: 20px;
  }

  .about-list li{
    font-size: 14px;
  }

  /* Products */
  .mi_right h4{
    font-size: 18px;
  }

  .mi_right .products-list li{
    font-size: 13px;
    padding: 10px 12px;
  }

  /* Advantages */
  .adv{
    padding: 16px;
  }

  .adv-icon{
    width: 50px;
    height: 50px;
  }

  .adv-content h4{
    font-size: 18px;
    margin-bottom: 6px;
  }

  .adv-content p{
    font-size: 14px;
  }

  /* Individual approach */
  .individual-approach{
    padding: 20px 0;
  }

  .individual-approach img{
    height: 32px;
  }

  .approach-block h3{
    font-size: 20px;
  }

  .approach-block p{
    font-size: 16px;
  }

  .approach-steps .steps-intro{
    font-size: 16px;
  }

  .step-item .step{
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Product cards */
  .products_detail-section .prod_card h3{
    font-size: 20px;
  }

  .prod_card_left, .prod_card_right{
    padding: 16px;
  }

  .prod_icon-circle{
    width: 60px;
    height: 60px;
  }

  .prod_card_left p, .prod_card_right p{
    font-size: 14px;
  }

  /* Projects */
  .projects-num a{
    font-size: 32px;
  }

  .projects-stat-text{
    font-size: 14px;
  }

  .projects-description{
    padding-left: 12px;
    border-left-width: 3px;
  }

  .projects-description p{
    font-size: 13px;
  }

  .projects-clients-bg{
    padding: 16px 20px;
  }

  .projects-clients-bg p{
    font-size: 14px;
  }

  /* Contact */
  .contact-section address{
    font-size: 14px;
    padding: 20px 16px;
  }

  .cta-row{
    flex-direction: column;
    width: 100%;
  }

  .cta-row a{
    width: 100%;
    text-align: center;
  }

  /* Upload form */
  #uploadForm label{
    font-size: 12px;
  }

  #uploadForm .dropzone{
    padding: 16px 12px;
    font-size: 13px;
  }

  /* Back to top */
  #back-to-top, .back-to-top{
    right: 12px;
    bottom: 16px;
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  /* Footer */
  .site-footer{
    padding: 16px 0;
  }

  .site-footer small{
    font-size: 12px;
  }
}

/* Very small phones */
@media (max-width:400px){
  .hero-left h2{
    font-size: 20px;
  }

  .section h3{
    font-size: 24px;
  }

  .logo-text h1{
    font-size: 13px;
  }

  .products_detail-section .prod_card h3{
    font-size: 18px;
  }

  .approach-block h3{
    font-size: 18px;
  }

  .btn{
    font-size: 12px;
    padding: 8px 12px;
  }
}

/* Landscape mode for phones */
@media (max-width:880px) and (orientation: landscape){
  .hero{
    padding: 20px 0;
  }

  .hero-inner{
    padding: 20px;
  }

  .hero-left h2{
    font-size: 24px;
    margin-bottom: 12px;
  }

  .section{
    padding: 24px 0;
  }
}