/* =========================================================
   Промена МК — Mobile & Responsive Patches
   Се вчитува ПОСЛЕДЕН на сите HTML страни — ги надополнува
   и поправа сите постоечки CSS фајлови за полна мобилна
   функционалност.
   ========================================================= */

/* ==========================================================
   1. ГЛОБАЛНИ TOUCH TARGETS И БАЗНИ ПОПРАВКИ
   ========================================================== */

/* Scroll lock кога мобилното мени е отворено */
body.menu-open {
  overflow: hidden;
}

/* Hamburger — гарантирана минимална touch surface */
.menu-toggle {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Hamburger X анимација кога менито е отворено */
.menu-toggle svg {
  transition: transform 0.25s ease;
}
.menu-toggle.is-open svg path:nth-child(1) {
  transform-origin: center;
  animation: ham-top 0.3s forwards;
}
.menu-toggle.is-open svg path:nth-child(2) {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.menu-toggle.is-open svg path:nth-child(3) {
  transform-origin: center;
  animation: ham-bot 0.3s forwards;
}
@keyframes ham-top {
  to { d: path("M3 18L21 6"); }
}
@keyframes ham-bot {
  to { d: path("M3 6L21 18"); }
}

/* Nav links touch targets во отвореното мени */
.nav-links.open a {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: 10px;
  transition: background 0.15s;
}
.nav-links.open a:hover,
.nav-links.open a:focus-visible {
  background: rgba(255, 255, 255, 0.07);
}

/* Глобални buttons — мин. 44px висина за touch */
.btn {
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Socials icons — 44×44 */
.socials a {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* FAQ copy — мин. 48px висина на копчето */
.faq-q {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Inputs и textarea */
input, textarea, select {
  font-size: 16px; /* Спречи iOS auto-zoom */
  touch-action: manipulation;
}

/* Max-width на слики */
img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================
   2. ПРЕФЕРИРАНО НАМАЛЕНА АНИМАЦИЈА
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .marquee-track {
    animation: none !important;
  }

  [data-parallax] {
    transform: none !important;
  }

  .reveal,
  .reveal-stagger {
    opacity: 1 !important;
    transform: none !important;
  }

  .reveal.in,
  .reveal-stagger.in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================
   3. TABLET — MAX-WIDTH: 980px
   ========================================================== */

@media (max-width: 980px) {

  /* Hero actions — побогати копчиња на tablet */
  .hero-actions {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* Tools filter tabs — scroll наместо wrap */
  .tools-tabs {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
  }
  .tools-tabs::-webkit-scrollbar {
    display: none;
  }
  .ftab {
    scroll-snap-align: start;
    flex-shrink: 0;
    min-height: 40px;
    white-space: nowrap;
  }

  /* AI Design grid — остани 2 колони на tablet */
  .md-grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* Models grid — 2 колони на tablet наместо скок на 1 */
  .models-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100%;
  }

  /* Influencer steps — 2 колони */
  .inf-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Why list на metodi */
  .why-list {
    max-width: 100%;
  }

  /* Method picker */
  .method-picker-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* ph-meta — побогато скалирање */
  .ph-meta {
    flex-wrap: wrap;
    gap: 16px 24px;
  }
}

/* ==========================================================
   4. МОБИЛЕН — MAX-WIDTH: 768px
   ========================================================== */

@media (max-width: 768px) {

  /* Hero lead text */
  .hero-lead {
    font-size: 1rem;
  }

  /* Stats grid — 2 колони */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Steps секција — 2 колони */
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps::before {
    display: none;
  }

  /* AI Design grid — остани 2 col */
  .md-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  /* Models grid — 1 колона */
  .models-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Influencer features — 2 колони */
  .inf-features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Why list */
  .why-list {
    max-width: 100%;
  }

  /* sp-price-new — помал */
  .sp-price-new {
    font-size: 2.4rem;
  }

  /* ph-meta (hero meta stats) */
  .ph-meta {
    gap: 12px 20px;
  }
  .ph-meta > div > strong {
    font-size: 1.4rem;
  }

  /* Footer brand parag */
  .footer-brand p {
    font-size: 0.9rem;
  }

  /* CTA trust items */
  .cta-trust {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
}

/* ==========================================================
   5. МОБИЛЕН — MAX-WIDTH: 640px
   ========================================================== */

@media (max-width: 640px) {

  /* Overlay за мобилното мени */
  .nav-links.open {
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 24px;
  }

  /* Hero */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Stats — 2 колони */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  /* Steps — 1 колона */
  .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Methods list rows */
  .m-row {
    padding: 14px 16px;
  }

  /* AI Design grid — 1 колона на телефон */
  .md-grid-2 {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Influencer steps — 1 колона */
  .inf-steps {
    grid-template-columns: 1fr;
  }

  /* Influencer features — 1 колона */
  .inf-features {
    grid-template-columns: 1fr;
  }

  /* Model cards */
  .models-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Why list */
  .why-item {
    gap: 14px;
  }

  /* Tools grid — 1 колона */
  .tools-grid {
    grid-template-columns: 1fr;
  }

  /* Tool card */
  .tool-card .tool-footer {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Filter tabs wrap */
  .ftab {
    min-height: 44px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* CTA pack */
  .tools-cta-pack {
    gap: 24px;
  }

  /* sp-price */
  .sp-price-new {
    font-size: 2rem;
  }
  .sp-price-old {
    font-size: 1rem;
  }

  /* Single pack features */
  .sp-features li {
    font-size: 0.9rem;
  }

  /* Price tag label */
  .price-tag {
    font-size: 0.75rem;
  }

  /* Methods CTA */
  .md-method-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .md-method-cta .btn {
    width: 100%;
    justify-content: center;
  }

  /* Home CTA actions */
  .sp-actions {
    flex-direction: column;
    gap: 10px;
  }
  .sp-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Includes visual — floating items скриени */
  .iv-pdf,
  .iv-chat {
    display: none;
  }

  /* Chips hidden */
  .chip-a, .chip-b, .chip-c {
    display: none;
  }

  /* Hero visual — намали */
  .hero-video {
    width: 100%;
    max-width: 100%;
  }

  /* Curriculum pills */
  .curriculum-pills {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  /* FAQ */
  .faq-q span:first-child {
    font-size: 0.95rem;
  }

  /* Story metrics */
  .story-metrics {
    flex-direction: column;
    gap: 12px;
  }

  /* Contact form rows */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Contact quick grid */
  .contact-quick-grid {
    grid-template-columns: 1fr;
  }

  /* Mission cards */
  .mission-card {
    flex-direction: column;
    gap: 12px;
  }
  .mission-card-icon {
    align-self: flex-start;
  }

  /* ph-meta — 2×2 */
  .ph-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .ph-meta > div {
    text-align: center;
  }

  /* Hero actions кај dedicated method pages */
  .hero-actions[style*="justify-content:center"] {
    align-items: stretch;
  }
  .hero-actions[style*="justify-content:center"] .btn {
    width: 100%;
    justify-content: center;
  }

  /* Method picker */
  .method-picker-grid {
    grid-template-columns: 1fr;
  }

  /* Marquee */
  .marquee {
    overflow: hidden;
  }

  /* Testimonials */
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   6. МАЛ ТЕЛЕФОН — MAX-WIDTH: 480px
   ========================================================== */

@media (max-width: 480px) {

  /* Исчистете негативни позиции кои можат да предизвикаат overflow */
  .tv-card-a,
  .tv-card-b {
    left: 0 !important;
    right: 0 !important;
  }

  /* Stats — 1 колона */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Model photos — помали */
  .model-photo img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  /* CTA bundle price */
  .sp-price-new {
    font-size: 1.8rem;
  }

  /* Tools mod rows — stack */
  .tools-mod-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .tools-mod-row .btn {
    align-self: stretch;
    justify-content: center;
  }

  /* Contact grid */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* pg-payment */
  .pg-payment {
    grid-template-columns: 1fr;
  }

  /* pg-includes */
  .pg-includes {
    grid-template-columns: 1fr;
  }

  /* sp-badge-stack */
  .sp-badge-stack {
    grid-template-columns: 1fr 1fr;
  }

  /* Marquee font */
  .marquee span {
    font-size: 0.8rem;
  }

  /* Story video player */
  .story-hv-player {
    min-height: 200px;
  }
}

/* ==========================================================
   7. МНОГУ МАЛ ТЕЛЕФОН — MAX-WIDTH: 380px
   ========================================================== */

@media (max-width: 380px) {

  /* 1 колона за сè */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .sp-badge-stack {
    grid-template-columns: 1fr;
  }

  /* ph-meta — 1 колона */
  .ph-meta {
    grid-template-columns: 1fr;
  }

  /* Buttons full width */
  .btn-lg {
    font-size: 0.9rem;
    padding: 12px 18px;
  }

  /* Heading scale */
  h1 {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }
  h2 {
    font-size: clamp(1.3rem, 7vw, 1.8rem);
  }

  /* sp-price-new */
  .sp-price-new {
    font-size: 1.6rem;
  }

  /* Model card foot */
  .model-card-foot {
    gap: 8px;
    flex-wrap: wrap;
  }
  .model-card-foot > div {
    min-width: 0;
  }
}

/* ==========================================================
   8. СПЕЦИФИЧНИ ФИКСОВИ ЗА ПОЕДИНЕЧНИ СТРАНИ
   ========================================================== */

/* --- iskustva.html --- */
.ph-disclaimer {
  max-width: 100%;
}

@media (max-width: 640px) {
  .stories-cta .home-cta-head {
    text-align: left;
  }
  .stories-cta .home-cta-head h2 {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
  }
}

/* --- ai-dizajn.html showcase grid --- */
@media (max-width: 640px) {
  .md-grid-2.reveal-stagger {
    max-width: 100%;
    grid-template-columns: 1fr 1fr;
  }
}

/* --- dropshipping / no-code model cards --- */
@media (max-width: 640px) {
  .model-card > div[style*="padding:20px"] {
    padding: 14px !important;
  }
  .model-card > div[style*="padding:28px"] {
    padding: 16px 14px !important;
  }
}

/* --- kontakt.html form --- */
@media (max-width: 640px) {
  .contact-form-wrap {
    padding: clamp(20px, 5vw, 32px);
  }

  .pg-cta-actions {
    flex-direction: column;
    gap: 10px;
  }
  .pg-cta-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .pg-faq-item summary {
    padding: 14px 16px;
    font-size: 0.95rem;
  }
}

/* --- tools.html featured tool --- */
@media (max-width: 640px) {
  .featured-tool {
    flex-direction: column;
    gap: 16px;
  }
  .featured-tool .ft-info {
    width: 100%;
  }
  .featured-tool .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- metodi.html package --- */
@media (max-width: 640px) {
  .sp-left,
  .sp-right {
    width: 100%;
  }
}

/* --- Influencer page hero sub --- */
@media (max-width: 640px) {
  .inf-hero-sub {
    font-size: 0.95rem;
    text-align: left;
  }
  .hero-actions[style] {
    justify-content: flex-start !important;
  }
}

/* ==========================================================
   9. ПЕЧАТЕЊЕ (опционално)
   ========================================================== */

@media print {
  .nav-wrap,
  .menu-toggle,
  .footer,
  .hero-blob,
  .mesh-bg,
  .marquee-wrap,
  .socials,
  .btn,
  .cta-trust,
  .home-cta-head,
  .tools-page-cta {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
