* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #111;
}

/* HERO */
.ps-hero {
  height: 60vh;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
              url('/assets/hero-placeholder.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 0 20px; 
}

.ps-hero-inner h1 {
  font-family: 'Montserrat', sans-serif; 
  font-size: 48px;
  font-weight: 700; 
  letter-spacing: 6px; 
  text-transform: uppercase; 
  word-wrap: break-word; 
  overflow-wrap: break-word;
  max-width: 100%; 
  line-height: 1.2;
  text-shadow: 2px 4px 10px rgba(0,0,0,0.3);
}

/* Smanjenje naslova za mobilne telefone */
@media (max-width: 600px) {
  .ps-hero-inner h1 {
    font-size: 28px; 
    letter-spacing: 3px; 
  }
}

.ps-hero-sub {
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-top: 10px;
  opacity: 0.85;
}

.ps-hero-scroll {
  font-family: 'Montserrat', sans-serif;
  display: inline-block;
  margin-top: 25px;
  padding: 10px 20px;
  border: 1px solid #fff;
  border-radius: 30px;
  color: #fff;
  text-decoration: none;
  font-size: 12px; 
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: 0.3s;
}

.ps-hero-scroll:hover {
  background: #fff;
  color: #000;
}

/* MAIN */
.ps-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.ps-info-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  text-align: center;

  position: sticky;
  top: 0;

  z-index: 999;

  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.ps-btn-outline {
  padding: 10px 18px;
  border: 1px solid #111;
  background: transparent;
  cursor: pointer;
  transition: 0.3s;
}

.ps-btn-outline:hover {
  background: #111;
  color: #fff;
}

/* LOADING */
.ps-loading {
  max-width: 400px;
  margin: 40px auto;
  text-align: center;
}

.ps-loading-bar-bg {
  height: 6px;
  background: #eee;
  border-radius: 6px;
  overflow: hidden;
}

.ps-loading-bar {
  height: 100%;
  width: 0%;
  background: #111;
  transition: width .3s ease;
}

.ps-loading-text {
  margin-top: 10px;
  font-size: 13px;
}

/* ============================= */
/* EDITORIAL MASONRY GRID */
/* ============================= */

.ps-gallery {
  margin-top: 40px;
}

@media (min-width: 900px) {
  .ps-gallery {
    column-count: 4;
  }
}

.ps-photo {
  break-inside: avoid;
  margin-bottom: 26px;
  position: relative;
  border-radius: 0px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 25px rgba(0,0,0,0.06);
  transition: 
    transform 0.4s cubic-bezier(.22,.61,.36,1),
    box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.ps-photo:nth-child(odd) {
  animation-delay: 0.05s;
}
.ps-photo:nth-child(even) {
  animation-delay: 0.12s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ps-photo:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.12);
}

.ps-photo img {
  width: 100%;
  display: block;
  transition: transform 0.7s ease;
}

.ps-photo:hover img {
  transform: scale(1.05);
}

.ps-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  padding: 16px;
  
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ps-select-btn {
  align-self: center;
}

/* LIGHTBOX */
.ps-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
}

.ps-lightbox img {
  max-width: 90%;
  max-height: 80vh;
}

#ps-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}

.ps-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 40px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
}

.ps-lb-prev { left: 20px; }
.ps-lb-next { right: 20px; }

/* PRINT SECTION */
.ps-print-section {
  margin-top: 60px;
  text-align: center;
}

.ps-print-title {
  margin-bottom: 15px;
  font-weight: 500;
}

.ps-input {
  width: 100%;
  max-width: 320px;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 20px;
}

.ps-btn-primary {
  padding: 12px 26px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.ps-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ZIP */
/* ============================= */
/* ZIP LOADING & SPINNER */
/* ============================= */

.ps-zip-status {
  display: none;
  font-size: 13px;
  color: #666;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.ps-loader-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top-color: #111; 
  animation: ps-spin 0.8s linear infinite;
}

@keyframes ps-spin {
  to { transform: rotate(360deg); }
}

.ps-loading-status-text.pulse {
  animation: ps-pulse 1.5s ease-in-out infinite;
}

@keyframes ps-pulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.ps-zip-progress {
  display: none;
  width: 150px; 
  height: 4px;
  background: #eee;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 10px;
}

/* MODAL */
.ps-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ps-modal-box {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.ps-modal-box h3 {
  margin-bottom: 20px;
  font-weight: 500;
}

.ps-modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

/* ============================= */
/* PREMIUM SELECT BUTTON */
/* ============================= */
/* ============================= */
/* PREMIUM BUTTON SYSTEM */
/* ============================= */

.ps-select-btn,
#ps-submit,
#ps-download-all,
.ps-download-btn,
.ps-btn-primary,
.ps-btn-outline,
.ps-info-link {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.15);
  color: #111;
  padding: 10px 22px;
  border-radius: 40px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.ps-select-btn {
  padding: 8px 20px;
}

.ps-select-btn:hover,
#ps-submit:hover,
#ps-download-all:hover,
.ps-download-btn:hover,
.ps-btn-primary:hover,
.ps-btn-outline:hover {
  background: #111;
  color: #fff;
  border-color: #111;
  transform: translateY(-1px);
}

.ps-photo.selected .ps-select-btn {
  background: #111;
  color: #fff;
  border-color: #111;
}

#ps-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================= */
/* PREMIUM COPIES CONTROL */
/* ============================= */

.ps-copies {
  align-self: center;       
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  padding: 6px 12px;
  border-radius: 40px;
  border: 1px solid rgba(0,0,0,0.15);
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}

.ps-copies button {
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 600;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #111;
}

.ps-copies button:hover {
  background: #111;
  color: #fff;
}

.ps-count {
  min-width: 22px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #111;
}

.ps-zip-inline {
  margin-top: 10px;
  width: 200px;
}

.ps-info-bar {
  flex-wrap: wrap; 
  gap: 10px;
}

.ps-zip-status,
.ps-zip-progress {
  display: none;
}

/* ============================= */
/* SELECTION MODE CONTROL */
/* ============================= */

/* Propustanje klika na sliku ispod overleja */
body.selection-mode .ps-overlay {
  opacity: 1;
  pointer-events: none; 
}

/* Omogucavamo klik samo na dugmice unutar overleja */
body.selection-mode .ps-overlay .ps-select-btn,
body.selection-mode .ps-overlay .ps-copies {
  pointer-events: auto;
}

/* Pozicioniranje Izaberi dugmeta u lightboxu */
.ps-lightbox-select {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10030;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sakrivanje Izaberi dugmeta u lightboxu kad mod za stampu NIJE aktivan */
body:not(.selection-mode) .ps-lightbox-select {
  display: none !important;
}

.ps-expire-warning {
  background:#fff3cd;
  color:#856404;
  padding:14px 18px;
  text-align:center;
  font-weight:600;
  font-size:14px;
  line-height:1.4;
  max-width:900px;
  margin:0 auto 20px auto;
  border-radius:8px;
}

@media (max-width:600px) {
  .ps-expire-warning {
    font-size:13px;
    padding:12px 14px;
    margin:10px 12px 18px 12px;
  }
}

/* ============================= */
/* GALLERY ROW FADE-IN */
/* ============================= */

.ps-gallery .ps-photo {
  opacity: 0;
  transform: translateY(20px);
  animation: psFadeIn 0.6s ease forwards;
}

.ps-gallery .ps-photo:nth-child(5n) { animation-delay: 0.05s; }
.ps-gallery .ps-photo:nth-child(5n+1) { animation-delay: 0.1s; }
.ps-gallery .ps-photo:nth-child(5n+2) { animation-delay: 0.15s; }
.ps-gallery .ps-photo:nth-child(5n+3) { animation-delay: 0.2s; }
.ps-gallery .ps-photo:nth-child(5n+4) { animation-delay: 0.25s; }

@keyframes psFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html {
  scroll-behavior: smooth;
}

/* ================================================= */
/* NOVI DUAL-HERO SISTEM ZA MOBILNE TELEFONE (9:16)  */
/* ================================================= */
@media (max-width: 768px) {
    .ps-hero {
        background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), var(--hero-mobile) center/cover no-repeat !important;
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        
        display: flex !important;
        flex-direction: column !important; 
        justify-content: space-between !important;
        
        padding: 60px 20px 100px 20px !important; 
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .ps-hero::before {
        display: none !important;
    }

    .ps-hero-inner {
        position: relative !important;
        background: transparent !important;
        color: #ffffff !important;
        padding: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: none !important;
        visibility: visible !important;
        
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }

    /* NASLOV (na dnu) */
    .ps-hero-inner h1 {
        order: 2 !important; 
        margin-top: auto !important; 
        margin-bottom: 40px !important; 
        
        color: #ffffff !important;
        font-size: 32px !important; 
        text-shadow: 2px 4px 10px rgba(0,0,0,0.4) !important;
        font-weight: 700 !important;
        letter-spacing: 4px !important;
        text-align: center !important;
    }

    .ps-hero-sub {
        color: rgba(255, 255, 255, 0.85) !important;
        opacity: 0.85 !important;
        font-size: 13px !important;
        letter-spacing: 3px !important;
        text-shadow: 1px 2px 5px rgba(0,0,0,0.3) !important;
    }

    /* DUGME ZA PORTFOLIO (na vrhu) */
    .ps-hero-scroll {
        order: 1 !important; 
        align-self: center !important;
        margin-top: 0 !important;
        
        color: #ffffff !important;
        border: 1px solid #ffffff !important;
        background: transparent !important;
        display: inline-block !important;
        font-size: 12px !important;
    }
}

/* ================================================= */
/* IOS HARDCORE OPTIMIZACIJA MEMORIJE (JETSAM FIX)   */
/* ================================================= */
html.is-ios .ps-gallery .ps-photo {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
}