/* ============================================
   Summit Photo - Main Stylesheet
   ============================================ */

:root {
  --color-bg: #1a1a2e;
  --color-bg-light: #16213e;
  --color-surface: #0f3460;
  --color-accent: #e94560;
  --color-accent-soft: #533483;
  --color-text: #eee;
  --color-text-muted: #aab;
  --color-menu-bg: #16213e;
  --color-menu-hover: #0f3460;
  --color-banner: #0a1628;
  --color-link: #7ec8e3;
  --menu-width: 240px;
  --header-height: auto;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-color: var(--color-bg);
  color: var(--color-text);
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #fff;
}

/* ---- Header / Banner ---- */

.banner {
  background: linear-gradient(135deg, var(--color-banner) 0%, #0d2137 50%, #0f3460 100%);
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.banner-logo {
  flex-shrink: 0;
  cursor: pointer;
  transition: transform var(--transition);
}

.banner-logo:hover {
  transform: scale(1.05);
}

.banner-logo svg {
  width: 72px;
  height: 72px;
  display: block;
}

.banner-info {
  flex-grow: 1;
  min-width: 0;
}

.banner-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
}

.banner-tags {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-tags span {
  color: var(--color-accent);
}

/* ---- Mobile menu toggle ---- */

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  flex-shrink: 0;
}

/* ---- Layout ---- */

.container {
  display: flex;
  min-height: calc(100vh - 100px);
}

/* ---- Sidebar Menu ---- */

.menu {
  width: var(--menu-width);
  min-width: var(--menu-width);
  background-color: var(--color-menu-bg);
  padding: 20px 12px;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,0.05);
  position: sticky;
  top: 104px;
  height: calc(100vh - 104px);
  scrollbar-width: thin;
  scrollbar-color: var(--color-surface) transparent;
}

.menu::-webkit-scrollbar {
  width: 6px;
}

.menu::-webkit-scrollbar-thumb {
  background: var(--color-surface);
  border-radius: 3px;
}

.menu-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  padding: 12px 12px 6px;
  margin: 0;
}

.menu-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 12px 0;
}

.menu a {
  display: block;
  padding: 8px 12px;
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.88rem;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu a:hover,
.menu a.active {
  background-color: var(--color-menu-hover);
  color: #fff;
  padding-left: 16px;
}

/* ---- Content Area ---- */

.content {
  flex-grow: 1;
  padding: 30px;
  max-width: 960px;
  margin: 0 auto;
  min-width: 0;
}

.content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
  color: #fff;
}

.content h2 {
  font-size: 1.4rem;
  color: var(--color-link);
  margin-top: 2rem;
}

.content p {
  text-align: justify;
  color: var(--color-text);
}

.content hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 2rem 0;
}

/* ---- Images in content ---- */

.content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  background-color: #111;
}

.content img.landscape {
  max-width: 90%;
}

.content img.portrait {
  max-width: 50%;
}

.content img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

/* ---- Videos in content ---- */

.content video {
  max-width: 90%;
  display: block;
  margin: 12px auto;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  background-color: #000;
}

/* ---- Loading Overlay ---- */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: opacity 0.5s ease;
}

.loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-bar-container {
  width: 300px;
  max-width: 80vw;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 20px;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-soft), var(--color-link));
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
  animation: shimmer 2s ease infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-text {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-top: 12px;
  letter-spacing: 1px;
}

.loading-mountain {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---- Intro / Home content ---- */

.intro-hero {
  text-align: center;
  padding: 20px 0;
}

.intro-hero .author-photo {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-accent);
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.3);
  margin: 0 auto;
}

.intro-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.intro-links a {
  padding: 8px 20px;
  border: 1px solid var(--color-link);
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.intro-links a:hover {
  background: var(--color-link);
  color: var(--color-banner);
}

/* ---- Lightbox ---- */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.92);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: none;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition);
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ---- Footer (inside content HOME link) ---- */

.content a[href*="summitphoto.sk"] {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-surface);
  border-radius: 6px;
  margin-top: 12px;
  transition: all var(--transition);
}

.content a[href*="summitphoto.sk"]:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ---- Responsive: Tablet ---- */

@media (max-width: 900px) {
  .content {
    padding: 20px;
  }

  .content img.landscape {
    max-width: 100%;
  }

  .content img.portrait {
    max-width: 65%;
  }
}

/* ---- Responsive: Mobile ---- */

@media (max-width: 700px) {
  .menu-toggle {
    display: block;
  }

  .banner {
    padding: 12px 16px;
  }

  .banner-logo svg {
    width: 48px;
    height: 48px;
  }

  .banner-name {
    font-size: 1.1rem;
  }

  .banner-tags {
    font-size: 0.7rem;
  }

  .container {
    flex-direction: column;
  }

  .menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    min-width: 280px;
    height: 100vh;
    z-index: 150;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.5);
    padding-top: 80px;
  }

  .menu.open {
    left: 0;
  }

  .menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 140;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .menu-backdrop.active {
    opacity: 1;
    pointer-events: all;
  }

  .content {
    padding: 16px;
  }

  .content h1 {
    font-size: 1.3rem;
  }

  .content img.portrait {
    max-width: 80%;
  }

  .content video {
    max-width: 100%;
  }

  .intro-hero .author-photo {
    width: 130px;
    height: 130px;
  }
}

/* ---- Back to top button ---- */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 90;
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: #ff5a7a;
  transform: translateY(-2px);
}
