/*
Theme Name: Marleen Suvi THEME
Author: Laura Jaakson
Text Domain: THEME
*/

/* ===== CSS Variables ===== */
:root {
  --sidebar-width: 450px;
  --header-height: 200px;
  --primary-color: #333;
  --secondary-color: #666;
  --accent-color: #999;
  --border-color: #eee;
  --transition-speed: 0.3s;
}

/* ===== RESET ===== */
html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

/* ===== HEADER ===== */
.sticky-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 150px !important;
  background: transparent !important;
  z-index: 1000 !important;
  display: flex !important;
  align-items: left !important;
  justify-content: left !important;
  padding: 1rem !important;
  font-size: 4rem !important;
  font-weight: bold !important;
  color: #333 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.text-justify {
  text-align: justify;
}

body {
  font-family: 'GFS Didot', serif;
  padding-top: 100px;
  padding-bottom: 100px;
  color: var(--primary-color) !important;
  overflow-x: hidden;
  text-align: justify;
}


h1, h2, h3, h4, h5, h6, .carousel-caption {
  font-family: 'GFS Didot', serif;
}

a {
  color: inherit;
}

/* TEXT SIZE */
.page h1 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--primary-color);
}

.page h2 {
  font-size: 1.5rem;
  font-weight: 200;
  color: var(--primary-color);
}

.header-scroll-container {
  display: flex !important;
  align-items: left !important;
  gap: 2rem !important;
  height: 100% !important;
  min-width: max-content !important;
  padding-top: 60px !important;
  padding-left: 40px !important;
}

.site-title {
  font-size: 2.5rem !important;
  font-weight: 500 !important;
  color: var(--primary-color) !important;
  padding-left: 4px;
}

.header-nav ul {
  display: flex !important;
  list-style: none !important;
  justify-content: space-between !important;
}

.header-nav a {
  color: var(--primary-color) !important;
  text-decoration: none !important;
  transition: color var(--transition-speed) !important;
  position: relative !important;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--secondary-color) !important;
  outline: none !important;
}

.header-nav a:focus-visible {
  transform: scale(1.1) !important;
}


/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: var(--header-height); 
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  z-index: 999;
}

.sidebar::-webkit-scrollbar {
  width: 2px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
}

/* WORKS & CONTACT */
.works-list,
.contact-list {
  list-style: none;
}

.works-list li,
.contact-list li {
  padding: 0.625rem 1.25rem;
}

.works-list a,
.contact-list a {
  color: var(--primary-color);
  text-decoration: none;
  display: block;
}

.works-list a:hover,
.contact-list a:hover,
.works-list a:focus-visible,
.contact-list a:focus-visible {
  color: var(--secondary-color);
}

/* ACTIVE MENU ITEMS */
.current-menu-item > a,
.current-page-item > a {
  color: var(--secondary-color) !important;
  font-style: italic;
}

/* SUBMENU */
.sidebar .sub-menu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
  transition: all var(--transition-speed) ease;
}

.sidebar .menu-item.open > .sub-menu {
  display: block;
}

.sidebar .menu-item-has-children > a::after {
  content: ' ›';
  font-size: 1rem;
  color: var(--accent-color);
  margin-left: 0.3rem;
  transition: transform 0.3s ease;
}

.sidebar .menu-item-has-children > a {
  display: block;
}

.sidebar .menu-item.current-menu-ancestor > .sub-menu {
  display: block;
}

.sidebar .sub-menu {
  list-style: none;
  padding-left: 1rem;
  margin-top: 0.25rem;
}

.sidebar .menu-item.open > .sub-menu,
.sidebar .menu-item.current-menu-ancestor > .sub-menu {
  display: block;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  margin-left: calc(var(--sidebar-width) + 20px);
  flex: 1;
  align-items: flex-start;
  display: block;
}

.content-area {
  margin-left: calc(var(--sidebar-width));
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
}

.page-title {
  font-size: 1.25rem;
  color: #333;
  font-weight: bold;
}

.page-content {
  width: 750px;
  margin-left: 0;
  padding-top: 0 !important;
  font-size: 1.2rem;
  line-height: 1.6;
  display: block;
  overflow: hidden;
}

.page-content img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Bio-lehe kitsas joondus --- */
.page-template-template-bio .bio-wrapper,
.page-template-template-bio .entry-content,
.page-template-template-bio .site-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
  margin-left: calc(var(--sidebar-width));
}

/* GALLERY CONTAINER */
.gallery-container {
  margin-top: 20px;
  padding-bottom: 0 !important;
  width: 80%;
  max-width: none;
  padding-left: 0;
  padding-right: 0;  
  position: relative;
}

.gallery-slider {
  width: 80%;
  height: 100%;
  overflow: visible;
  position: relative;
}

/* CAROUSEL */
.splide__slide {
  display: flex;
  height: 700px;
  overflow: hidden;
}

.splide__slide img {
  width: 100%;
  height: 100%;
  max-height: 700px;
  object-fit: contain;
}

.splide__track {
  display: flex;
}

.carousel-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.gallery-slider {
  position: relative;
  width: 100%;
}

.carousel-title {
  font-size: 1.25rem;
  color: #333;
  margin-top: 10px;
  font-weight: bold;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  z-index: 10;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  padding: 0.5rem;
  border-radius: 50%;
}

.carousel-arrow.prev {
  left: 10px;
}

.carousel-arrow.next {
  right: 10px;
}

/* UPLOADS GRIDS */
.uploads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  max-width: calc(100% - var(--sidebar-width));
  margin-left: var(--sidebar-width);
}

.upload-item {
  position: relative;
  overflow: hidden;
}

.upload-item img {
  width: 50%;
  height: 300px;
  object-fit: cover;
  transition: transform var(--transition-speed);
}

.upload-item:hover img {
  transform: scale(1.03);
}

/* ===== MEDIA QUERIES START HERE ===== */

@media (max-width: 768px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
    padding: 0;
  }

    aside, .content-area, .gallery-container {
    display: none !important;
  }
  
  .sticky-header,
  .site-title,
  .logo {
    display: none !important;
  }

  .sidebar,
  .nav-desktop {
    display: none !important;
  }

  .burger-toggle {
    display: block;
    font-size: 2rem;
    padding: 0;
    cursor: pointer;
  }

  .mobile-nav {
    display: none;
    flex-direction: column;
    align-items: center;
    background: white;
    z-index: 999;
  }

  .mobile-nav.open {
    display: flex;
  }

  .main-wrapper,
  .container,
  .content-area,
  .site-content,
  .main-content,
  .page-content {
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: hidden;
    text-align: center;
  }

  nav, .nav-menu,
  h1, h2, h3, p {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .uploads-grid {
    grid-template-columns: 1fr;
    margin-left: 0;
    padding: 0;
  }
}
