/* ============================================================
   BOR-MASTEN.FROM.HR — site.css
   Javni dio stranice
   ============================================================ */

/* --- Design tokens --- */
:root {
  --primary:        #2563eb;
  --primary-dark:   #1e40af;
  --primary-light:  #dbeafe;
  --accent:         #38bdf8;
  --accent-glow:    rgba(56,189,248,0.15);
  --text:           #0f172a;
  --text-muted:     #64748b;
  --text-light:     #94a3b8;
  --border:         #e2e8f0;
  --bg:             #f8fafc;
  --bg-card:        #ffffff;
  --bg-dark:        #0f172a;
  --bg-dark2:       #1e293b;
  --radius:         10px;
  --radius-lg:      18px;
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.06);
  --shadow:         0 4px 24px rgba(0,0,0,0.09);
  --shadow-lg:      0 12px 48px rgba(0,0,0,0.14);
  --font-display:   'Space Grotesk', system-ui, sans-serif;
  --font-body:      'Inter', system-ui, sans-serif;
  --header-h:       68px;
  --max-w:          1140px;
  --max-w-text:     720px;
}

/* --- Base --- */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-spacer {
  height: var(--header-h);
}

.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.logo-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* --- Nav --- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  text-decoration: none;
}

.nav-admin {
  color: var(--accent) !important;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.nav-username {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.nav-lang {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.75rem;
  border-left: 1px solid var(--border);
  padding-left: 0.75rem;
}

.nav-lang a {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.nav-lang a.active,
.nav-lang a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* Btn outline za nav */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Hero section --- */
.hero {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark2) 60%, #1e3a5f 100%);
  color: #fff;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: #94a3b8;
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(56,189,248,0.4);
  box-shadow: 0 0 48px rgba(56,189,248,0.2);
  flex-shrink: 0;
}

.hero-avatar-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  border: 4px solid rgba(56,189,248,0.4);
  box-shadow: 0 0 48px rgba(56,189,248,0.2);
  flex-shrink: 0;
}

/* --- Sections --- */
.section {
  padding: 5rem 1.5rem;
}

.section-alt {
  background: var(--bg-card);
}

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-text {
  max-width: var(--max-w-text);
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section-dark .section-eyebrow {
  color: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.section-dark .section-title {
  color: #fff;
}

.section-body {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.section-dark .section-body {
  color: #94a3b8;
}

/* --- Cards grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.card-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Gallery preview --- */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.gallery-preview-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--border);
}

.gallery-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-preview-item:hover img {
  transform: scale(1.05);
}

.gallery-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.gallery-preview-item:hover .gallery-preview-overlay {
  opacity: 1;
}

.gallery-preview-caption {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* --- Contact section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
  align-items: start;
}

.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.contact-info-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contact-info-value {
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}

.contact-info-value a {
  color: var(--primary);
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 300px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Login gate --- */
.login-gate {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}

.login-gate-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.login-gate h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.login-gate p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-dark);
  color: #64748b;
  padding: 2rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 0.9375rem;
}

.footer-copy {
  font-size: 0.8125rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8125rem;
}

.footer-right a {
  color: #64748b;
  text-decoration: none;
}

.footer-right a:hover {
  color: var(--accent);
}

/* --- Owner inline edit overlay --- */
.owner-edit-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(37,99,235,0.9);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
  font-family: var(--font-body);
}

.owner-editable {
  position: relative;
}

.owner-editable:hover .owner-edit-btn {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-avatar-placeholder,
  .hero-avatar {
    margin: 0 auto;
    width: 150px;
    height: 150px;
    font-size: 3rem;
  }
  .hero-cta { justify-content: center; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .site-nav {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.25rem;
    box-shadow: var(--shadow);
  }

  .site-nav.open { display: flex; }
  .nav-link { width: 100%; padding: 0.625rem 0.75rem; }
  .nav-user { flex-direction: column; align-items: flex-start; }
  .nav-lang { border-left: none; padding-left: 0; margin-left: 0; margin-top: 0.5rem; }

  .section { padding: 3.5rem 1.25rem; }
  .hero { padding: 4rem 1.25rem 3rem; }
}
