/* =========================
   Global / Base styles
   ========================= */

/* Best practice: Ensure padding and borders don't increase element width */
* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: white;
  background-color: #2f2f5c;
  /* Flexbox Sticky Footer Logic */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: opacity 0.3s ease-in;
}

/* Ensures content expands to push footer to the bottom */
.main-content {
  flex: 1;
}

body.lang-loading {
  opacity: 0 !important; /* Keep opacity for fade-in effect */
  visibility: hidden !important; /* Hide content completely until JS is ready */
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.header-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-center {
  text-align: center;
}

.Virsraksti h1 {
  text-align: center;
  color:  #2f2f5c;
  font-size: 36px;
  text-shadow: 3px 0px 6px rgba(0,0,0,0.5);
  margin: 0;
}

.Virsraksti p {
  text-align: center;
  color:  #2f2f5c;
  font-size: 16px;
  margin: 5px 0 15px;
  max-height: 50px; /* Give it a max-height for the transition */
  overflow: hidden;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Allows menu items to wrap to a second line instead of breaking the layout */
  gap: clamp(30px, 10vw, 120px); 
  background-color: #e3c24a;
  font-size: 18px;
}

nav a {
  position: relative;
  text-decoration: none;
  color: darkblue;
  font-weight: bold;
  padding: 2px 4px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 3px;
  background-color: orange;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 100%;
}

.pamatteksts > section {
  color: white;
  max-width: 305px;
  padding: 24px;
  text-align: left;
  border-radius: 12px;
  background: #3a3c75;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pamatteksts > section:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.pamatteksts {
  background-color: #2f2f5c;  
  display: flex;
  justify-content: center;
  gap: clamp(30px, 5vw, 80px);
  padding: 60px 20px 80px;
  margin: 0 auto;
}

/* =========================
   REVIEWS SECTION
   ========================= */
#reviews {
  background-color: #2f2f5c;
  padding: 80px 20px;
  text-align: center;
}

#reviews h2 {
  font-size: 36px;
  margin-top: 0;
  margin-bottom: 30px;
  text-decoration: underline;
  text-decoration-color: #f2c200;
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
}

/* =========================
   REVIEWS CAROUSEL
   ========================= */

/* The viewport for the carousel, which hides the overflowing content */
.reviews-carousel {
  max-width: 100%;
  overflow: hidden;
  padding: 30px 0; /* Creates "playing space" so cards aren't cut off when scaling up */
  margin-bottom: 10px; /* Reduced margin to compensate for the new padding */
  /* Adds a subtle fade on the left and right edges for a cleaner look */
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  display: block;
  width: 100%;
}

/* The track that holds and animates the reviews */
#reviews-container {
  display: flex; /* Aligns all review cards in a single horizontal row */
  width: max-content; /* Ensures the container is wide enough to hold all reviews without wrapping */
  gap: 20px; /* Use gap instead of margins for more predictable spacing */
  padding: 0 10px; /* Small padding to offset the first/last gap */
  will-change: transform; /* A performance hint for the browser that the transform property will be animated */
  transform: translate3d(0, 0, 0);
}

/* Pause the animation when the user hovers over the carousel */
.reviews-carousel:hover #reviews-container {
  /* !important is required to override the inline animation style set by JS */
  animation-play-state: paused !important;
}

/* Define the scrolling animation */
@keyframes scroll {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    /* Moving to -50% ensures a perfect loop when content is doubled */
    transform: translate3d(-50%, 0, 0);
  }
}

.review {
  background: #3a3c75;
  border: 1px solid #f2c200;
  border-radius: 8px;
  padding: 15px 20px;
  text-align: left;
  width: 100%;
  max-width: 350px; /* Responsive width */
  flex-shrink: 0; /* Prevents cards from shrinking to fit the container */
  margin: 0; /* Margin removed in favor of container gap */
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  position: relative;
  /* Prevents "vibrating" or sub-pixel jitter during animation */
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.review:hover {
  transform: translate3d(0, -5px, 0);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
  z-index: 10;
  cursor: default;
}

.review h4 {
  margin: 0 0 5px;
  color: #f2c200;
  font-size: 18px;
}

.review-lang-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  color: #f2c200;
  background: rgba(242, 194, 0, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(242, 194, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  letter-spacing: 0.5px;
}

.review .name-emoji {
  filter: brightness(0) invert(1); /* Forces the emoji to render as pure white */
  margin-right: 5px;
}

.review .stars {
  margin-left: 8px;
  letter-spacing: 1px;
}

.review .empty-stars {
  opacity: 0.25; /* Makes the empty stars much more subtle */
  font-weight: normal;
}

.review p {
  margin: 0;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

/* =========================
   REVIEWS FORM
   ========================= */
#review-form {
  max-width: 600px;
  margin: 40px auto 0; /* Space from reviews above */
}

#review-form h3 {
  font-size: 28px;
  margin-top: 0;
  margin-bottom: 20px;
  color: #f2c200; 
  text-decoration: underline;
  text-decoration-color: white;
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
}

#review-form input,
#review-form textarea,
#review-form select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-bottom: 20px;
  background: #3a3c75;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  resize: none;
  color: #ffffff;
  transition: border-color 0.2s ease;
}

#review-form input:-webkit-autofill,
#review-form input:-webkit-autofill:hover,
#review-form input:-webkit-autofill:focus,
#review-form input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 30px #3a3c75 inset !important;
  -webkit-box-shadow: 0 0 0 30px #3a3c75 inset !important;
}

#review-form input::placeholder,
#review-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#review-form textarea {
  height: 120px;
}

#review-form input:focus,
#review-form textarea:focus,
#review-form select:focus {
  outline: none;
  border: 2px solid #f2c200;
}

#review-form button {
  width: 100%;
  padding: 12px;
  background: #f2c200;
  color: #2f325f;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

#review-form button:hover {
  background: #d9ad00;
}

#review-status {
  margin-top: 15px;
  font-size: 16px;
  color: #f2c200;
  min-height: 20px;
}

#kontakti {
  background-color: #2f2f5c;
  width: 100%; 
  text-align: center;
  border: none;
  border-radius: 0;
  box-sizing: border-box;
  margin-top: 40px;
  padding: 80px 20px;
  scroll-margin-top: 180px; /* Ensures header doesn't cover content on jump */
}

#kontakti h2 {
  font-size: 36px;
  margin-top: 0;
  margin-bottom: 75px;
  text-decoration: underline;
  text-decoration-color: #f2c200;
  text-underline-offset: 8px;        
  text-decoration-thickness: 3px;    
}

/* =========================
   CONTACT SECTION LAYOUT
   ========================= */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; 
  gap: 40px;
  max-width: 1100px;
  margin: 30px auto 0;
  align-items: flex-start;
}

.contact-info,
.contact-form-wrapper {
  flex: 1;
  min-width: 300px; 
}

.contact-info {
  text-align: left;
  padding-top: 10px; 
}

.contact-info p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 25px;
}

.contact-form-wrapper #contact-form {
  margin-top: 0; 
}

#pakalpojumi h2 {
  text-align: center;
  text-decoration: underline;
  text-decoration-color: #f2c200;
  text-underline-offset: 5px;        
  text-decoration-thickness: 2px;    
}

#apraksts h2 {
  text-align: center;
  text-decoration: underline;
  text-decoration-color: #f2c200;
  text-underline-offset: 5px;      
  text-decoration-thickness: 2px;   
  margin-bottom: 25px;
}

#apraksts p, #apraksts li {
  line-height: 1.7;
  margin-bottom: 12px;
}

#apraksts li {
  line-height: 1.6;
}

.star-rating-container {
  margin-bottom: 25px;
  text-align: left;
}

.stars-input {
  cursor: pointer;
  display: inline-block;
  position: relative;
  font-size: 2rem; /* Adjust star size */
}

.stars-input > span {
  color: #d3d3d3; /* Default grey color */
  transition: color 0.2s ease-in-out;
}

/* On hover, all stars up to the hovered one turn a lighter gold */
.stars-input:hover > span {
  color: #ffdf88; /* Lighter gold for hover */
}

/* The stars that come *after* the one you are hovering over go back to grey */
.stars-input > span:hover ~ span {
  color: #d3d3d3;
}

/* Keep selected stars a solid gold color, overriding hover */
.stars-input > span.selected {
  color: #ffc107; /* Solid gold for selected */
}

/* Ar bildēm saistītais */
/* ===== PREVIEW ===== */
.overlay {
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  color: #fff;
}

.darbi-preview {
  position: relative;
  max-width: 720px;
  margin-top: 24px;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
}

.darbi-preview img {
  width: 100%;
  display: block;
}

.darbi-preview .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 15, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: 0.3s;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.darbi-preview:hover .overlay {
  opacity: 1;
}

/* ===== MODAL BACKGROUND ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto; /* This enables the scrollbar */
  background-color: rgba(8, 10, 20, 0.9);
  backdrop-filter: blur(6px);
  overscroll-behavior: contain; /* Prevents scroll chaining */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* ===== MODAL BOX ===== */
.modal-content {
  background-color: #0f1320;
  margin: 50px auto; /* 50px from top/bottom, centered horizontally */
  padding: 24px;
  border: 1px solid #f2c200;
  width: 90%;
  max-width: 1250px;
  border-radius: 16px;
  position: relative;
}

/* ===== SCROLL LOCK CLASS ===== */
body.modal-open,
html.modal-open {
  overflow: hidden !important;
}

/* ===== CLOSE BUTTON ===== */
.close {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 28px;
  cursor: pointer;
  color: #f5c76a;
  transition: 0.2s;
}

.close:hover {
  color: #ffd98e;
}

/* ===== GALLERY GRID ===== */
.gallery {
  display: grid;
  /* Adjusted minmax for better mobile responsiveness. 'min(100%, 280px)' ensures images stack and fit within the viewport on small screens. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

/* Force 3 columns on desktop screens */
@media (min-width: 769px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== GALLERY IMAGES ===== */
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 200, 80, 0.25);
  cursor: zoom-in;
}

/* =========================
   CONTACT FORM
   ========================= */

#contact-form {
  max-width: 600px;
  margin: 20px auto 0; /* Add top margin for spacing */
  /* Container styles removed to blend form into the section */
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  margin-bottom: 20px;
  background: #3a3c75; /* Use the light blue from the old container */
  border: 2px solid transparent; /* Thicker transparent border to prevent layout shift on focus */
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  resize: none; /* Disable textarea resize */
  color: #ffffff; /* White text for contrast */
  transition: border-color 0.2s ease;
}

/* Override browser autofill styles */
#contact-form input:-webkit-autofill,
#contact-form input:-webkit-autofill:hover, 
#contact-form input:-webkit-autofill:focus, 
#contact-form input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important; /* Keep text white */
    box-shadow: 0 0 0 30px #3a3c75 inset !important; /* Force background color */
    -webkit-box-shadow: 0 0 0 30px #3a3c75 inset !important; /* For older webkit */
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#contact-form textarea {
  height: 140px;
  min-height: 100px;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  border: 2px solid #f2c200; /* Thicker, more visible focus border */
}

#contact-form button {
  width: 100%;
  padding: 12px;
  background: #f2c200;
  color: #2f325f;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

#contact-form button:hover {
  background: #d9ad00;
}

#status {
  margin-top: 15px;
  text-align: center;
  font-size: 18px;
  font-weight: bold;
  color: #f2c200;
  min-height: 20px;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#openContact {
  background: #f2c200;
  color: black;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  padding: 6px 14px;
  font-weight: 500;
  transition: all 0.25s ease;
}

#openContact:hover {
  background: #e3c24a;
  transform: translateY(-2px);
}



.Numberbtn {
  background: #25D366;
  color: white;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  font-weight: 500;
  transition: all 0.25s ease;
}

.Numberbtn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

ul {
  list-style: none;
  padding: 0;
}

ul li {
  padding: 5px;
}

footer {
  position: relative; 
  z-index: 0;         
  box-shadow: 0 -10px 15px rgba(0, 0, 0, 0.3); 
  background-color: #222;
  color: white;
  text-align: center;
  padding: 10px;
}

/* Transition for smooth language switching */
[data-key], [data-placeholder-key], #lang-text {
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.lang-fade {
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
}

.lang-wrapper {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 20px;
  max-height: 100px; /* Safe limit for button + text */
  overflow: hidden;
  transition: all 0.3s ease-in-out; /* Smooth transition for fade and collapse */
}

#lang-btn {
  margin-right: 0;
  background-color: #ffffff;
  background-image: url("https://icons.veryicon.com/png/o/education-technology/elements-1/language-multilingual.png"); /* your image */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  width: 55px;
  height: 55px;
  padding: 0;
  border-radius: 55px;       
  cursor: pointer;           
  border: none;
  transition: filter 0.3s, transform 0.2s;
}

#lang-btn:hover {
  transform: scale(1.1);
}

#lang-text {
  color: #000000;
  font-weight: bold;
  font-size: 14px;
  pointer-events: none; 
  text-align: center;
}

.adrese { /* Google Maps iframe container */
  margin-top: 20px;
  width: 100%;
  height: clamp(300px, 50vh, 500px); /* Responsive height for better mobile viewing */
  overflow: hidden;
  border-radius: 10px; /* maigi noapaļoti stūri */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2); /* soft shadow */
}

.adrese iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.logo {
  display: block;
  margin: 0 auto;
  width: 90px;
  height: auto;
}

#calculator {
  background:  #3a3c75;              
  border-radius: 12px;
  padding: 24px; 
  width: 100%;
  max-width: 305px;
  color: #ffffff;
  font-family: Arial, sans-serif;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

#calculator:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

#calculator h2 {
  text-align: center;
  margin: 0 0 16px;
  color: #ffffff;
  border-bottom: 2px solid #f2c200;
}

#calculator label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  margin-bottom: 12px;
}

#calculator input,
#calculator select {
  margin-top: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
}

#calculator [data-key="calcNote"] {
  min-height: 80px;
}

#calculator input:focus,
#calculator select:focus {
  outline: 2px solid #f2c200;
}

#calculator input.error-input {
  outline: 2px solid #ff4d4d !important;
}

.calc-error-message {
  color: #ff4d4d;
  font-size: 11px;
  margin-top: 4px;
  display: none;
}

#calculator button {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: #f2c200;
  color: #2f325f;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#calculator button:hover {
  background: #e3c24a;
}

#calculator #result {
  visibility: hidden;
  min-height: 1.2em;
  margin-top: 14px;
  margin-bottom: 0;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: #f2c200;
}

#calculator #result.visible {
  visibility: visible;
}

/* ===== Pakalpojumu lapa ===== */

.pakalpojumi {
  display: flex;
  flex-direction: column;
  background-color: #2f2f5c;
  padding: 60px 0;
  flex: 1;
  width: 100%; 
}

.pakalpojumi .page-title,
.pakalpojumi .page-subtitle {
  text-align: center;
  color: white;
}

.pakalpojumi .page-title {
  text-decoration: underline;
  text-decoration-color: #f2c200;
  text-underline-offset: 8px;
  text-decoration-thickness: 3px;
  margin-bottom: 20px;
}

.pakalpojumi .services-grid {
  display: grid;
  /* Adjusted minmax for better mobile responsiveness. 'min(100%, 280px)' ensures cards never exceed 100% width on small screens, preventing overflow. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 30px;
  max-width: 1100px; /* Default max-width for smaller screens (e.g., tablets) */
  margin: 35px auto;
  padding: 0 20px;
}

/* For larger screens (PC), force 4 columns and allow the grid to expand */
@media (min-width: 1200px) {
  .pakalpojumi .services-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1400px;
  }
}

.pakalpojumi .service-card {
  background-color: #3a3c75;
  border-radius: 12px;
  padding: 10px 24px 10px 24px;
  min-height: 245px;
  line-height: 1.5;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pakalpojumi .service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.pakalpojumi .service-card h2 {
  line-height: 1.1;
  color: #f2c200;
  margin-bottom: 10px;
  text-align: center;
}

/* ===== Pakalpojumu lapa ===== */

/* ===== LIGHTBOX (ZOOM) ===== */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10001; /* Above gallery modal */
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border: 2px solid #f2c200;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

/* ===== LANGUAGE DROPDOWN ===== */
.lang-dropdown {
  display: none;
  position: fixed;
  background-color: #2f2f5c;
  border: 2px solid #f2c200;
  border-radius: 8px;
  padding: 5px 0;
  z-index: 10002;
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
  min-width: 60px;
  text-align: center;
}

.lang-dropdown.show {
  display: block;
}

.lang-option {
  padding: 8px 12px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.lang-option:hover {
  background-color: #f2c200;
  color: #2f2f5c;
}

/* =========================
   STICKY HEADER
   ========================= */

.main-header-container {
  position: sticky;
  top: 0;
  z-index: 9999;
  background-color: white; /* This covers the top part, nav has its own bg */
  /* Shadow is now applied on scroll */
  transition: box-shadow 0.3s ease-in-out;
  overflow-anchor: none;
}

/* Add initial padding to the header area for the transition to work */
.Virsraksti {
  padding-top: 10px;
}

/* Add transitions for smooth shrinking */
.Virsraksti,
.logo,
.Virsraksti h1,
.Virsraksti p {
  transition: all 0.3s ease-in-out;
}

/* Scrolled state styles */
.main-header-container.scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.main-header-container.scrolled .Virsraksti {
  padding-top: 5px;
}

.main-header-container.scrolled .logo {
  width: 60px;
}

.main-header-container.scrolled .Virsraksti h1 {
  font-size: 24px;
}

.main-header-container.scrolled .Virsraksti p {
  /* Smoothly hide the slogan */
  opacity: 0;
  max-height: 0;
  margin: 0;
}


/* prieks 3d modula */


/* ===== CONTROLS ===== */
.controls{
    position:absolute;
    top:20px;
    left:20px;
    background:white;
    padding:15px;
    border-radius:10px;
    box-shadow:0 8px 20px rgba(0,0,0,0.15);
    z-index:10;
}

.controls input{
    width:80px;
    margin-bottom:10px;
    padding:5px;
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  display: none; /* Hidden by default, shown by JS */
  position: fixed;
  bottom: 0;
  left: 0; 
  width: 100%;
  background-color: #3a3c75; /* Darker blue, similar to card backgrounds */
  color: white;
  padding: 12px 20px;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  z-index: 10000; /* Ensure it's above other content */
  justify-content: center; /* Center content horizontally */
  align-items: center; /* Center content vertically */
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
  gap: 15px; /* Space between text and button */
}

.cookie-banner p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  flex-shrink: 0; /* Prevent text from shrinking too much */
}

.cookie-banner button {
  background-color: #f2c200; 
  color: #2f325f; /* Dark blue text */
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0; /* Prevent button from shrinking */
}

.cookie-banner button:hover {
  background-color: #e3b300; /* Slightly darker yellow on hover */
  transform: translateY(-1px);
}

/* ===== SCENE ===== */
.scene{
    opacity:0;
    transition: opacity 0.8s ease-in-out;
    margin-top: 22px;
    position:relative;
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:310px;
    overflow:hidden;
    perspective:1200px;
}


/* ===== BLOCK ===== */
.block{
    margin-top: 250px; 
    position:relative;
    width:260px;
    max-width:90%;
    transform-style:preserve-3d;
    transform-origin:bottom center;

    /* tavu projection saglabāju */
    transform:
        rotateX(30deg)
        rotateY(-18deg)
        translateY(-20px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ===== TOP (BETONS) ===== */
.area{
    /* margin-top: 5px; */
    position:absolute;
    width:100%;
    height:var(--area-h,150px);

    top:calc(-1 * var(--area-h,150px));

    background:
        linear-gradient(
            160deg,
            rgba(255, 255, 255, 0.2),
            rgba(0, 0, 0, 0.05)
        ),
        url("../images/concrete.webp");

    background-size:cover;
    background-position:center;
    background-blend-mode:overlay;
    box-shadow:
        inset 0 2px 10px rgba(255, 255, 255, 0.25);
    transition: height 0.6s ease-out, top 0.6s ease-out;
}


/* ===== BIEZUMS ===== */
.thickness{
    position:absolute;

    width:100%;
    height:var(--thickness-h,14px);

    top:0;

    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.1),
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.45)
        ),
        url("../images/biezums.webp");

    background-size:cover;
    background-position:center;
    background-blend-mode:multiply;

    /* noņemam agresīvo skew */
    transform:
        rotateX(90deg)
        translateZ(calc(var(--thickness-h,14px) * 1));

    transform-origin:bottom;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -5px 10px rgba(0, 0, 0, 0.35);
    transition: height 0.6s ease-out, transform 0.6s ease-out;
}



/* THE BEVEL (Diagonal Corner Bridge) */
.side::before{
    display:none;
}



/* Right-side face for the thickness part */
.thickness::after{
    display:none;
}



/* ===== SĀNS ===== */
.side{
    position:absolute;

    width:var(--thickness-h,14px);

    height:var(--area-h,150px);

    left:100%;
    top:calc(-1 * var(--area-h,150px));

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.15),
            rgba(0, 0, 0, 0.45)
        ),
        url("../images/biezums.webp");

    background-size:cover;
    background-position:center;
    background-blend-mode:multiply;

    transform:
        rotateY(90deg);

    transform-origin:left;

    box-shadow:
        inset 4px 0 8px rgba(255, 255, 255, 0.10),
        inset -8px 0 15px rgba(0, 0, 0, 0.45);
    transition: width 0.6s ease-out, height 0.6s ease-out, top 0.6s ease-out;
}


.side-thickness{
    display:none;
}



/* ===== SHADOW ===== */
.block::after{
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background: rgba(0, 0, 0, 0.18);
    filter:blur(18px);
    transform:translateZ(-1px);
    z-index:-1;
}