/* ===============================
   ROOT VARIABLES
   =============================== */

:root {
  /* Font families */
  --font-head: AveriaLibre,Montserrat,Comfortaa,"Bauhaus Regular", Arial, Helvetica, sans-serif;
  --font-body: AveriaLibre,Montserrat,Comfortaa, "Bauhaus Regular",system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Font size step: +2pt ≈ +3px */
  --fs-step: 3px;

  /* Typography scale */
  --fs-body: calc(16px + var(--fs-step));
  --fs-h1: calc(3rem + var(--fs-step));
  --fs-h2: calc(2.2rem + var(--fs-step));
  --fs-h3: calc(1.5rem + var(--fs-step));
  --fs-h4: calc(1.25rem + var(--fs-step)); /* NEW: smaller card titles */
  --fs-small: calc(0.85rem + var(--fs-step));

  /* Colors */
  --text: #0b0f14;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8f9fb;
  --accent: #000000;

  /* Layout */
  --radius: 14px;
  --gap: 24px;
  --wrap: 1200px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 24px rgba(0,0,0,0.08);
}

/* ===============================
   RESET / BASE
   =============================== */

*,
*::before,
*::after { box-sizing: border-box; }


html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* BRAND (top-left) */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: block;
  transition: all 0.3s ease;
}

/* small logo in header */
.brand-logo--small {
  width: auto;
  height: 48px;
  opacity: 0; /* hidden at page start */
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* text visible at page start */
.brand-text {
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* large logo near title */
.brand-logo--large {
  width: 160px;      /* adjust as you want */
  height: auto;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* SCROLLED STATE */
body.is-scrolled .brand-text {
  display: none;
}

body.is-scrolled .brand-logo--small {
  opacity:1;
}

body.is-scrolled .brand-logo--large {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.portfolioimg { display: block;height:180px;}
.imaginiimg { display: block;height:180px;}

.open-lightbox { text-decoration: none;}
a { color: inherit; text-decoration: none; }

/* ===============================
   TYPOGRAPHY
   =============================== */

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.55em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); } /* NEW */

p { margin: 0.6em 0 0; }

.small, .micro, .note, .fine {
  font-size: var(--fs-small);
  color: var(--muted);
}

/* More breathing room so paragraphs don't crowd headings */
h2 { margin-top: 0.9em; }
section { scroll-margin-top: 90px; } /* good with sticky header */

/* ===============================
   LAYOUT HELPERS
   =============================== */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.section-head { margin-bottom: 32px; }

.section-head .sub {
  max-width: 760px;
  color: var(--muted);
}

/* Extra spacing between sections so the end of one doesn't crowd the next */
section { padding: 56px 0; }

.project-card {
	/* This ensures it never gets wider than 700px */
	max-width: 800px; 
  
  /* This forces the element to take up the full width MINUS 10px on each side */
  /* calc(100% - 20px) accounts for 10px left + 10px right */
  width: calc(100% - 20px); 
  
  /* This centers the container once it hits the 700px limit */
  margin-inline: auto;
 }


.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ===============================
   NAVIGATION (MOBILE DROPDOWN)
   =============================== */

.nav {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
  padding: 12px 0;
}

.brand-name { font-family: var(--font-head); font-size: 1.4rem; }
.brand-sub { margin-left: 6px; color: var(--muted); }

.menu {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.menu a {
  padding: 8px 10px;
  border-radius: 999px;
}

.menu a:hover { background: var(--bg-soft); }

.nav-toggle { display: none; }

.nav-toggle-btn {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.nav-toggle-btn:hover { background: var(--bg-soft); }

.nav-toggle-btn .bars {
  width: 18px;
  height: 2px;
  background: var(--accent);
  position: relative;
  display: block;
}

.nav-toggle-btn .bars::before,
.nav-toggle-btn .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--accent);
}

.nav-toggle-btn .bars::before { top: -6px; }
.nav-toggle-btn .bars::after  { top:  6px; }



/* ===============================
   HERO
   =============================== */

.hero { 
	display: flex;
	padding: 72px 0; 
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
}
.hero-grid-big {
  display: grid;
  gap: 40px;
  max-width: 800px;
  width: 100%;
  justify-content: center;
}

.kicker {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-size: var(--fs-small);
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-cta-kicker {
  margin-top: 18px;
  margin-bottom: 10px;
}

.micro { margin-top: 18px; color: var(--muted); }

/* ===============================
   BUTTONS (ONE STYLE ONLY)
   =============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: transparent;
  font-size: var(--fs-small);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}

.btn:hover { background: var(--accent); color: #fff; }
.btn.small { padding: 6px 14px; }

/* Language buttons: black hover, softer contrast */
.lang.btn:hover {
  background: #111111;         /* slightly softer than pure black */
  color: #f5f5f5;
  border-color: #111111;
}

/* Mobile: keep text and actions vertically stacked (less confusing) */


/* ===============================
   CARDS
   =============================== */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover { box-shadow: var(--shadow-md); }

.stat {
  display: block;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 10px;
}

.stat:hover { background: var(--bg-soft); }

/* ===============================
   GRIDS
   =============================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* ===============================
   PORTFOLIO
   =============================== */

.portfolio { display: grid; gap: var(--gap); }

.gallery-under {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.shot img { width: 100%; height: auto; }

.label { padding: 10px 14px; font-size: var(--fs-small); }

.filetag {
  padding: 0 2px 2px;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--muted);
}

/* ===============================
   IMAGE WALL
   =============================== */

.image-wall {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.tile {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  display: grid;
  justify-content: center;
}



/* The hidden background */
/* The 90% container */
/* Lightbox Background */
/* Renamed from .overlay to .project-viewer */
.project-viewer {
  display: none; /* Hidden until JS triggers it */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9); 
  backdrop-filter: blur(8px);
  z-index: 100000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* Removes the blue flash on mobile tap */
}

.project-viewer .content {
  width: 90%;
  height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 20px 20px 40px rgba(100,100,100,0.5);
  width:90%;
  height:90%;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 50px;
  color: white;
  cursor: pointer;
  z-index: 10000;
}



/* ===============================
   CONTACT
   =============================== */

.contact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

/* ===============================
   FOOTER
   =============================== */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: var(--fs-small);
  text-align: center;
}

/* Ensure the nav-menu has a transition so it doesn't just 'snap' */
.nav-menu {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease;
}

/* If your menu uses 'active' class to show/hide */
.nav-menu.active {
  display: flex !important;
  /* or transform: translateX(0); depending on your setup */
}

/* 1. This is the initial state (hidden & moved down) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out; /* Smoothness control */
  visibility: hidden;
}

/* 2. This class will be added by JavaScript when scrolling */
.reveal.active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.main-image {
	height:50vh;
	border-radius: 20px;
}

/* carusel class */
#main-image.carousel-container {
    position: relative; /* Essential for absolute children */
    height: 50vh;
    width: 400px;        /* Takes full width of the grid cell */
    max-width: 60vw;    /* Limits desktop width as you requested */
    margin: 0 auto;
    overflow: hidden;   /* Prevents images from "bleeding" out and causing zoom issues */
    cursor: pointer;
    background-color: transparent;
}

.carousel-item {
    position: absolute; /* Stacks images on top of each other */
    top: 0;
    left: 0;
    width: auto;
    height: 100%;
    
    /* Use opacity + visibility for smooth transitions */
    opacity: 0;
    visibility: hidden; 
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    
    display: flex;
    justify-content: center; /* Centers the image horizontally */
    align-items: center;     /* Centers the image vertically */
    z-index: 1;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.carousel-item img {
    height: 600px;
    width: 350px;        /* Keeps ratio */
    max-width: 100%;    /* PREVENTS THE ZOOM ISSUE: Image cannot be wider than the container */
    object-fit: contain;
}

/* Dots: Fixed for mobile */
.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(0, 0, 0, 0.3); /* Darker so visible on light images */
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.dot.active {
    background: #fff;
}


/* portfolio - services layout */

.services-two-cols {
    position: relative;
    display: flex;

    background-image: url("../images/services-img.png");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: auto 100%;

    padding: 60px 0;
    min-height: 450px;
}

/* LEFT CONTENT COLUMN */
.services-left {
    width: 55%;
    padding-right: 50px;
    z-index: 2;
	background-color: rgba(255,255,255, 0.5);
	border-radius: 170px;
}


/* end of porfolio - services */

/* Specific Mobile Fix */
@media (max-width: 768px) {
    #main-image.carousel-container {
        max-width: 100vw; /* Allow it to be wider on small screens if needed */
        height: 40vh;     /* Slightly shorter so more text is visible on Android */
    }
}

@media (max-width: 820px) {
	.brand-logo--large {
	  width: 20vw;      /* adjust as you want */
	  height: auto;
	  transition: opacity 0.3s ease, transform 0.3s ease;
	}

.portfolioimg { display: block;height:120px;}
.imaginiimg { display: block;height:120px;}
	
  .nav-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .nav-toggle-btn { display: inline-flex; }

  .menu {
    display: none;
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .menu a {
    padding: 12px 12px;
    border-radius: 10px;
  }

  .nav-toggle:checked ~ .menu { display: flex; }

  .nav-toggle:checked + .nav-toggle-btn .bars { background: transparent; }
  .nav-toggle:checked + .nav-toggle-btn .bars::before {
    top: 0;
    transform: rotate(45deg);
  }
  .nav-toggle:checked + .nav-toggle-btn .bars::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .nav-toggle-btn .bars,
  .nav-toggle-btn .bars::before,
  .nav-toggle-btn .bars::after {
    transition: transform .2s ease, top .2s ease, background .2s ease;
  }
  
  
  .hero-actions,
  .inline-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-grid-big {
	  justify-content:left;
  }

  .btn { width: 100%; }
  
  .main-image {
	max-width: 60vw;
	}
	
	.image-wall { grid-template-columns: repeat(2, 1fr); }

  .hero-grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  
  .gallery-under { grid-template-columns: 1fr; }
  
  .contact { grid-template-columns: 1fr; }
  
/* portofoliu -services layout */

}