/* =========================================================
   OPG Branko Marinov – responsive.css
   Mobile-first responsive breakpoints
   ========================================================= */

/* --- Breakpoints:
   --xs:  < 480px
   --sm:  < 640px
   --md:  < 768px
   --lg:  < 1024px
   --xl:  < 1280px
   ========================================================= */

/* --- Large Desktop (1280px+) --- */
@media (min-width: 1280px) {
  .container {
    padding: 0 2rem;
  }
}

/* --- Below 1024px --- */
@media (max-width: 1023px) {
  /* Fix: backdrop-filter na headeru sprječava position:fixed na nav-u */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  /* Header */
  .burger-menu {
    display: flex;
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    min-height: calc(100vh - var(--header-height));
    background: rgba(22, 30, 14, 0.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 1.5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 1001;
    border-top: 2px solid rgba(200, 168, 75, 0.3);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-list li {
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);
  }

  .nav-list a {
    display: block;
    padding: 1.1rem 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-radius: 0;
    letter-spacing: 0.03em;
  }

  .nav-list a::after {
    display: none;
  }

  .nav-list a:hover,
  .nav-list a.active {
    background: transparent;
    color: var(--color-gold-light);
    padding-left: 0.5rem;
    border-left: 3px solid var(--color-gold);
  }

  .nav-list li {
    border-bottom: 1px solid rgba(200, 168, 75, 0.15);
  }

  .nav-list .nav-shop a {
    color: var(--color-gold-light);
    border: none;
    font-weight: 600;
  }

  .nav-list .nav-shop a:hover {
    background: transparent;
    color: var(--color-gold);
  }

  .mobile-nav-cta {
    display: block !important;
    margin-top: 2rem;
    width: 100%;
    text-align: center;
  }

  /* Layout */
  .why-grid,
  .family-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .why-image,
  .family-image {
    aspect-ratio: 16/9;
  }

  .family-grid .family-image {
    order: -1;
  }

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

  .about-two-col {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about-image-block {
    aspect-ratio: 16/9;
  }

  .dalmatia-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .dalmatia-image {
    aspect-ratio: 16/9;
    order: -1;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

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

/* --- Below 768px --- */
@media (max-width: 767px) {
  /* Blog article layout – force single column, hide sidebar */
  .article-layout {
    display: block !important;
  }

  .article-sidebar {
    display: none !important;
  }

  .article-body,
  .article-back {
    width: 100% !important;
  }

  /* Article CTA box – full width buttons */
  .article-cta .btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }

  /* Inline CTA block buttons */
  .article-content .btn,
  .article-body .btn {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Typography */
  h1 { font-size: clamp(1.9rem, 6vw, 2.8rem); }
  h2 { font-size: clamp(1.5rem, 4vw, 2rem); }

  /* Spacing */
  section { padding: var(--space-xl) 0; }
  :root { --space-xl: 3rem; --space-2xl: 4rem; }

  /* Hero */
  .hero {
    min-height: 85vh;
    align-items: flex-end;
    padding-bottom: 4rem;
  }

  .hero-content {
    padding: 0;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Trust Strip */
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  /* Products */
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Quality */
  .quality-grid {
    grid-template-columns: 1fr;
  }

  /* Blog */
  .blog-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* CTA */
  .cta-banner .cta-actions,
  .final-cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-banner .cta-actions .btn,
  .final-cta-actions .btn {
    width: 100%;
    max-width: 340px;
    justify-content: center;
  }

  /* Family stats */
  .family-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .stat-number {
    font-size: 1.8rem;
  }

  /* Contact form */
  .contact-form-card {
    padding: var(--space-md);
  }

  /* WhatsApp sticky - move up a bit on mobile */
  .whatsapp-sticky {
    bottom: 1.5rem;
    right: 1.25rem;
    width: 52px;
    height: 52px;
  }

  .whatsapp-sticky svg {
    width: 24px;
    height: 24px;
  }

  /* Cookie banner */
  .cookie-banner-inner {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* --- Below 640px --- */
@media (max-width: 639px) {
  /* Products */
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Trust strip */
  .trust-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  /* Family stats */
  .family-stats {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }

  /* Values grid */
  .values-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  /* Blog page grid */
  .blog-page-grid {
    grid-template-columns: 1fr;
  }

  /* Breadcrumb */
  .breadcrumb {
    font-size: 0.78rem;
  }

  /* Article */
  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.15rem;
  }

  /* Container */
  .container {
    padding: 0 1rem;
  }
}

/* --- Below 480px --- */
@media (max-width: 479px) {
  :root {
    --header-height: 68px;
  }

  .logo-main {
    font-size: 1rem;
  }

  .logo-sub {
    display: none;
  }

  .hero-label {
    font-size: 0.68rem;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .product-size {
    font-size: 2rem;
  }

  .page-hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }
}

/* --- Print Styles --- */
@media print {
  .site-header,
  .site-footer,
  .whatsapp-sticky,
  .cookie-banner,
  .burger-menu {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .page-offset {
    padding-top: 0;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* --- Dark Mode (minimal, preserves brand) --- */
@media (prefers-color-scheme: dark) {
  /* Intentionally not implemented to preserve brand colors.
     The warm beige/cream palette is core to the brand identity. */
}
