:root {
  --bg-color: #282a2f;
  --panel: #1a1c20;
  --text-primary: #f8f8f8;
  --text-secondary: #8b8d9d;
  --border: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.18);

  /* Fluid typography and spacing from Home page */
  --radius-xl: 30px;
  --container-max: 1920px;
  --container-pad: clamp(16px, 5vw, 100px);

  --h1: clamp(40px, 5.2vw, 80px);
  --h2: clamp(32px, 4vw, 64px);
  --p-lg: clamp(16px, 2.1vw, 34px);
  --p-md: clamp(16px, 1.2vw, 20px);
  --p-sm: 16px;
}

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Red Hat Display', sans-serif; /* Standardized Font */
  line-height: 1.5;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
}

.divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.18); /* Exact match for homet.css */
  margin: 20px;
}

/* =========================================
   HEADER
========================================= */
.site-header{
  padding: 20px 0;
  position: relative;
  z-index: 10;
}
.header-container{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 24px;
}
.logo-svg{ height: 32px; }

.main-nav{
  display:flex;
  gap: clamp(18px, 3vw, 60px);
  align-items:center;
  flex-wrap: wrap;
}
.nav-link{
  font-size: var(--nav);
  font-weight: 400;
  text-transform: capitalize;
}
@media (max-width: 1024px){
  .main-nav{ display:none; }
  .burger-btn{ display:inline-flex; }
}

/* =========================================
   MOBILE BURGER + MENU
========================================= */
.burger-btn{
  display:none;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  align-items:center;
  justify-content:center;
  transition: transform .2s ease, background .2s ease;
}

/* 3 lines */
.burger-btn span{
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: transform .25s ease, opacity .25s ease, background .25s ease;
}
.burger-btn span:nth-child(1){ top: 22px; }
.burger-btn span:nth-child(2){ top: 27px; width: 18px; }
.burger-btn span:nth-child(3){ top: 32px; }

.burger-btn:hover{ transform: translateY(-1px); }

body.menu-open .burger-btn span:nth-child(1){
  top: 27px;
  transform: translateX(-50%) rotate(45deg);
}
body.menu-open .burger-btn span:nth-child(2){ opacity: 0; }
body.menu-open .burger-btn span:nth-child(3){
  top: 27px;
  transform: translateX(-50%) rotate(-45deg);
}

/* overlay */
.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}
.mobile-menu.is-open{ display:block; }

.mobile-menu__backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
}

/* drawer */
.mobile-menu__panel{
  position:absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(420px, 86vw);
  background: rgba(26,28,32,0.96);
  border-left: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  padding: 22px 18px;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.2,.8,.2,1);
  display:flex;
  flex-direction:column;
  gap: 18px;
}
.mobile-menu.is-open .mobile-menu__panel{ transform: translateX(0); }

.mobile-menu__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mobile-menu__title{
  font-size: clamp(12px, 0.9vw, 14px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.mobile-menu__close{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
  cursor:pointer;
  transition: .2s ease;
}
.mobile-menu__close:hover{ background: rgba(255,255,255,0.10); }

.mobile-menu__nav{
  display:flex;
  flex-direction:column;
  gap: 10px;
  padding-top: 8px;
}
.mobile-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  font-size: clamp(14px, 1.1vw, 16px);
  color: rgba(255,255,255,0.92);
  transition: .2s ease;
}
.mobile-link:hover{ background: rgba(255,255,255,0.08); }

/* =========================
   DESKTOP DROPDOWN
========================= */
.nav-dropdown {
    position: relative;
    display: inline-block;
    padding: 10px 0; /* Adds hover buffer so menu doesn't disappear */
}

/* The Dropdown Box */
.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%; /* Position right below the link */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--panel);
    min-width: 180px;
    box-shadow: 0px 8px 24px rgba(0,0,0,0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show on Hover */
.nav-dropdown:hover .dropdown-content {
    display: block;
    opacity: 1;
}

/* Dropdown Links */
.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    border-radius: 8px;
    transition: background 0.2s;
    white-space: nowrap;
}

    .dropdown-content a:hover {
        background-color: rgba(255,255,255,0.05);
        color: var(--text-primary);
    }

/* =========================
   MOBILE SUB-LINKS
========================= */


/* Indent the sub-links slightly */
.mobile-link.sub-link {
    background: transparent;
    border: none;
    padding: 10px 14px;
    font-size: 15px;
}

    .mobile-link.sub-link:hover {
        background: rgba(255,255,255,0.02);
    }

/* =========================
   MOBILE DROPDOWN FIXES
========================= */



/* 4. Make Sub-Buttons Smaller ("Fix Huge Buttons") */
.mobile-link.sub-link {
    padding: 10px 14px; /* Less padding than main links (14px) */
    font-size: 14px; /* Slightly smaller text */
    background: transparent; /* Remove background box */
    border: none; /* Remove border */
    color: var(--text-secondary);
}

    .mobile-link.sub-link:hover {
        color: var(--text-primary);
        background: rgba(255,255,255,0.05);
    }

/* Portfolio trigger should look like normal mobile link */
.mobile-link[data-menu-dropdown] {
    padding: 14px 14px;
    font-size: clamp(14px, 1.1vw, 16px);
}

body.menu-open{
  overflow: hidden;
  touch-action: none;
}

.banner-img,
.info-image img,
.grid-item img {
  border-radius: var(--radius-xl); /* Uses the variable we added to :root */
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

.banner-img:hover,
.info-image img:hover,
.grid-item img:hover {
  transform: scale(1.04);
}

#hero {
    padding: clamp(40px, 4vw, 80px) 0 0;
}

/* 1. Update the container to align title and button side-by-side */
.hero-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end; /* This pulls the button down to the baseline of the second line */
    gap: 40px;
    padding-top: clamp(40px, 4vw, 80px);
    padding-bottom: clamp(70px, 6vw, 120px);
}
/* Specific style for the Website button in the hero */
.hero-content .btn-pill {
  min-width: 150px;           /* Slightly narrower than before, but still substantial */
  display: inline-flex;
  justify-content: space-between; /* Text to left, Arrow to right */
  align-items: center;
  padding: 12px 24px;         /* Balanced internal padding */
  text-align: left;
}

/* Ensure the arrow doesn't have extra margins */
.hero-content .btn-pill img {
  margin-left: 10px;
  transform: rotate(-90deg); /* Keeps your vertical arrow orientation */
}

/* 2. Reset title margins to allow perfect alignment with the button */
.hero-title {
  font-size: var(--h1);
  font-weight: 400;
  line-height: 1.08;
  text-transform: uppercase;
  margin-bottom: 0; 
}

/* 3. Style the button and the arrow icon (Matches index.html logic) */
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.hero-btn .btn-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.hero-btn:hover .btn-icon {
  transform: translate(2px, -2px); /* Moves arrow diagonally on hover */
}

/* 4. Hide the old bottom container as it is no longer used */
.hero-bottom {
  display: none; 
}

/* 5. Mobile Fix: Stack title and button vertically on small screens */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 20px;
  }
  
  .hero-btn {
    justify-self: start;
  }
}

.hero-banner {
  margin: clamp(70px, 6vw, 120px) 0; /* Changed from 100px */
}

.banner-img {
  width: 100%;
  /* Making it shorter: adjust this value to your preference */
  height: clamp(700px, 50vh, 600px); 
  object-fit: cover; /* This prevents the image from stretching/distorting */
  object-position: center; /* Keeps the focus on the center of the photo */
}

.hero-info {
  display: grid;
  grid-template-columns: 1fr 1fr; 
  align-items: stretch;         /* Forces both columns to be the same height */
  margin-bottom: clamp(70px, 6vw, 120px);
  gap: 60px;
}

.info-image img {
  width: 100%;
  height: 100%;                 /* Fill the grid row height */
  min-height: 400px;            /* Increased height as requested */
  object-fit: cover;            /* Prevents distortion when tall */
  border-radius: var(--radius-xl);
}

.info-text {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;  /* Keeps text at the top */
  padding-bottom: 20px;         /* Optional breathing room at bottom */
}

.info-text p {
  color: #ffffff !important;   /* Force white color */
  font-size: var(--p-md);      /* Standard paragraph size */
  line-height: 1.7;
  margin-top: 0;               /* Remove any top margin to keep gap consistent */
}

.info-text .address {
  display: block;               /* Makes it behave like a block so margins work */
  font-size: 14px !important;    /* Force small size */
  color: #8b8d9d !important;    /* Force the grey color */
  margin-bottom: 80px !important; /* Force the big gap */
  text-transform: none;
  line-height: 1;
}

.year {
  color: var(--text-secondary);
  font-size: 14px;              /* Slightly smaller label */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.project-title {
  font-size: 24px;              /* Much smaller than the clamp(--h2) value */
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 15px;          /* Slightly tighter gap */
  font-weight: 600;             /* Semi-bold for clear hierarchy */
  text-transform: none;
  letter-spacing: -0.01em;
}

.address {
  display: block;               /* REQUIRED for the margin to work */
  font-size: 16px;              /* Smaller size */
  color: var(--text-secondary); /* Grey color (#8b8d9d) */
  margin-bottom: 100px;          /* Much bigger gap between address and text */
  text-transform: none;         /* Ensures it's not all caps */
}

.info-desc p {
  margin-bottom: 22px;
  line-height: 1.7;
  font-size: 18px; 
  color: rgba(255,255,255,0.80);
}

.gallery-nav {
    display: flex;
    gap: 12px;
}

.gallery-nav-btn {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.22);
    color: rgba(255,255,255,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s ease;
}

    .gallery-nav-btn:hover {
        border-color: rgba(255,255,255,0.45);
        color: rgba(255,255,255,0.95);
        transform: translateY(-1px);
    }

    .gallery-nav-btn:disabled {
        opacity: .35;
        cursor: default;
        transform: none;
    }

/* --- Gallery Section Spacing & Header --- */

/* 1. INCREASE GAP: Space between Hero Info text and Gallery Title */
.hero-info + .divider {
    margin-top: 100px;
    margin-bottom: 160px;
}

@media (max-width: 768px) {
    .hero-info + .divider {
        margin-bottom: 120px;
    }
}


/* 2. ALIGNMENT: Put title and buttons in one row */
.gallery-header-row {
    display: flex;
    justify-content: space-between; /* Title on left, buttons on right */
    align-items: center; /* Vertical center alignment */
    padding-bottom: 24px; /* Space before the divider line below it */
}

/* Ensure the nav buttons container doesn't wrap unless on mobile */
.gallery-nav-buttons {
    display: flex;
    gap: 12px;
}

    /* Optional: Style adjustment for the nav buttons to match your pill style */
    .gallery-nav-buttons .gallery-nav-btn {
        width: 44px;
        height: 44px;
        border: 1px solid var(--border-strong);
        background: transparent;
        border-radius: 50%;
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .gallery-nav-buttons .gallery-nav-btn:hover {
            background: rgba(255,255,255,0.1);
            border-color: rgba(255,255,255,0.5);
        }








@media (max-width: 1200px) {
  .hero-info {
    flex-direction: column;
  }
  .info-image img {
    width: 100%;
    max-width: 100%;
  }
  .info-text {
    max-width: 100%;
  }
}


  .gallery-grid .item-small { grid-column: span 1; }
.gallery-grid .item-large { grid-column: span 2; }
.gallery-grid .item-wide { grid-column: span 2; }


@media (max-width: 1024px){
  .burger-btn{
    display:inline-flex !important;
  }
  .burger-btn span{ background: #fff !important; opacity: 1 !important; }
}


#features {
    padding-top: 40px;
}

.section-title {
    font-size: 48px;
    text-transform: uppercase;
    font-weight: 400;
    margin-top: 0px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  padding: 100px 0;
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-image {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 550/663;
  background-color: #333;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 10px;
}

.card-year {
  color: var(--text-secondary);
  font-size: 14px;
  display: block;
  margin-bottom: 5px;
}

.card-title {
  font-size: 24px;
  font-weight: 400;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

#location {
    padding-top: 0;
    padding-bottom: 20px;
}

.location-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 100px 0;
}

.map-container {
  position: relative;
  width: 100%;
  border-radius: 30px;
  overflow: hidden;
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: auto;
}

.map-bg {
  width: 100%;
  border-radius: 30px;
}

.map-pin {
  position: absolute;
  top: 60%;
  left: 54%;
  transform: translate(-50%, -100%);
  width: 75px;
}

.map-pin-shadow {
  position: absolute;
  top: 60%;
  left: 54%;
  transform: translate(-50%, -50%);
  width: 34px;
}

@media (max-width: 768px) {
  .location-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
}


/* ===== Footer ===== */
.footer-section {
    /* background: var(--panel); */
    padding-top: 30px;
}
.footer-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 18px;
  margin-bottom: 46px;
}
.footer-map-card{
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.04);
  height: clamp(400px, 40vw, 700px);
  position: relative;
}

/* контейнер leaflet */
.footer-map{
  width: 100%;
  height: 100%;
}

/* Leaflet fixes: чтобы тайлы не “ломались” в flex/grid */
.footer-map .leaflet-container{
  width: 100%;
  height: 100%;
  background: #1a1c20;
  outline: none;
}

/* Ч/Б + “как на макете” контраст/яркость */
.footer-map .leaflet-tile{
  filter: grayscale(1) contrast(1.08) brightness(1.08);
  opacity: 0.92;
}

/* скрыть кредиты/контролы (если хочешь прям как картинка) */
.footer-map .leaflet-control-container{
  display: none;
}

/* лёгкий затемняющий слой, чтобы карта была “вписана” в стиль */
.footer-map-card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(0deg, rgba(40,42,47,0.25), rgba(40,42,47,0.25));
}
.footer-map-img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity: .85;
  filter: grayscale(1) contrast(1.05) brightness(1.1);
}
.footer-info{
  margin-top: 44px;
  padding-top: 26px;
  display:grid;
  grid-template-columns: 1.2fr 1.6fr 1.2fr 1fr;
  gap: clamp(18px, 3vw, 40px);
  align-items:center;
}
.footer-info__logo img{
  width:100%;
  max-width: 256px;
  opacity: .9;
}
.footer-label{
  display:block;
  text-transform: uppercase;
  font-size: clamp(14px, 1.1vw, 16px);
  letter-spacing: .08em;
  color: var(--text-secondary);
  opacity: .7;
}
.footer-text{
  font-size: clamp(16px, 1.4vw, 22px);
  line-height: 1.45;
  opacity: .95;
}
.footer-link:hover{ text-decoration: underline; }
.footer-social{
  display:flex;
  justify-content:flex-end;
  gap: 30px;
}
.footer-social__btn{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition: .2s ease;
}
.footer-social__btn img{ width:44px; height:44px; opacity:.95; }
.footer-social__btn:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
}
.footer-bottom{
  margin-top: 70px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 28px 0;
  text-align:center;
  font-size: clamp(14px, 1.1vw, 16px);
  color: var(--text-secondary);
  opacity: .75;
}

@media (max-width:1240px){
  .footer-text{
    white-space:nowrap;
  }
}

@media (max-width: 1024px){
  .footer-info{
    grid-template-columns: 1fr 1fr;
    align-items:start;
  }
  .footer-social{ justify-content:flex-start; }
}
@media (max-width: 640px){
  .footer-top{
    flex-direction:column;
    align-items:flex-start;
  }
  .footer-info{ grid-template-columns: 1fr; }

  .footer-info{
    text-align: center;
  }

  .footer-info__logo img{
    margin: auto;
  }

  .footer-social {
        justify-content: center;
  }
}


/*======== Shared Button =========*/
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: clamp(12px, 0.9vw, 14px);
  cursor:pointer;
  transition: .25s ease;
}
.btn:hover{ background: var(--text-primary); color: var(--bg-color); }

.btn-pill{
  display:inline-flex;
  align-items:center;
  gap: 12px;
  padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: clamp(12px, 0.9vw, 14px);
  text-transform: uppercase;
  background: transparent;
  transition: .25s ease;
  white-space: nowrap;
}
.btn-pill img{
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}
.btn-pill:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.4);
  cursor: pointer;
}

.btn-footer-active{
  background: #F8F8F8;
  color:#282A2F;
}

.btn-footer-active:hover{
  background: rgba(255, 255, 255, 0.343);
  border-color: rgba(255,255,255,0.4);
}

.btn-footer-active img{
  transform:rotate(0deg);
}

/* Target the buttons specifically in the "You may also like" section */
.features-grid .btn-pill {
    min-width: 140px; /* Increases the width */
    justify-content: space-between; /* Pushes 'MORE' to the left and arrow to the right */
    padding: 12px 24px; /* Matches the hero button padding */
}

    /* Ensure the arrow is oriented correctly */
    .features-grid .btn-pill img {
        transform: rotate(-90deg); /* Keeps the arrow pointing up/diagonal */
        margin-left: 10px;
    }


/* =========================
   MOBILE FIXES ONLY
========================= */
@media (max-width: 768px) {

    /* ---------- GLOBAL ---------- */

    .divider {
        margin: 32px 0;
    }

    /* ---------- HERO ---------- */

    .hero-content {
        text-align: center;
    }

        .hero-content .btn-pill {
            align-self: center;
        }

    .hero-banner {
        margin: 40px 0;
    }

    .banner-img {
        height: 42vh; /* was way too tall */
        min-height: 260px;
        border-radius: 22px;
    }

    /* ---------- HERO INFO ---------- */

    .hero-info {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .info-image img {
        height: auto;
        min-height: unset;
        aspect-ratio: 4 / 3;
    }

    .info-text {
        padding-bottom: 0;
    }

    .address {
        margin-bottom: 32px !important;
    }

    /* ---------- GALLERY HEADER ---------- */

    .gallery-header-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        text-align: center;
    }

    .gallery-nav-buttons {
        justify-content: center;
    }

    .gallery-nav-btn {
        width: 52px;
        height: 52px;
    }

    /* ---------- GALLERY GRID ---------- */

  

    /* ---------- FEATURES ---------- */

    .section-title {
        text-align: center;
    }

    .card-content {
        padding: 0;
    }
}
@media (max-width: 768px) {
    .btn-pill {
        min-width: unset;
        padding: 10px 16px;
        font-size: 12px;
    }

    .features-grid .btn-pill {
        min-width: unset;
        justify-content: center;
        gap: 10px;
    }

    .footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

   

        .gallery-grid::-webkit-scrollbar {
            display: none;
        }

    /* .grid-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
    } */

        .grid-item img {
            aspect-ratio: 4 / 3;
        }

    /* Move nav buttons BELOW images */
    .gallery-header-row {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        text-align: center;
    }

    .gallery-nav-buttons {
        justify-content: center;
        gap: 28px;
    }

    .gallery-nav-btn {
        width: 56px;
        height: 56px;
    }

    /* =========================================
   DYNAMIC PORTFOLIO GALLERY (NEW SYSTEM)
========================================= */

    .gallery-scroll {
        display: flex;
        gap: 34px;
        overflow-x: auto;
        scroll-behavior: smooth;
        padding: 80px 0 100px;
    }

        .gallery-scroll::-webkit-scrollbar {
            display: none;
        }

    .gallery-column {
        display: flex;
        flex-direction: column;
        gap: 24px;
        min-width: 360px;
    }

        .gallery-column img {
            width: 100%;
            height: 260px;
            object-fit: cover;
            object-position: center;
            border-radius: var(--radius-xl);
        }

        .gallery-column.large img {
            height: 520px;
        }

    /* Mobile */
    @media (max-width: 768px) {
        .gallery-scroll {
            gap: 20px;
            padding: 40px 0 60px;
        }

        .gallery-column {
            min-width: 85%;
        }

            .gallery-column img,
            .gallery-column.large img {
                height: auto;
                aspect-ratio: 4 / 3;
            }
    }


    .hero-content .btn-pill {
        min-width: unset;
        width: 100px;
        justify-content: center;
        padding: 10px 16px;
        gap: 8px;
        justify-self: center;
    }

        .hero-content .btn-pill img {
            margin-left: 0;
        }
}


/* =========================
   SINGLE PORTFOLIO GALLERY — MOSAIC + PAGES (by 6)
   #sp-gallery-grid is always GRID (no flex pages)
========================= */

#sp-gallery-grid.gallery-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding: 80px 0 100px;
  grid-auto-rows: 260px;         /* фикс высота рядов */
  grid-auto-flow: dense;         /* плотная укладка */
}

#sp-gallery-grid .grid-item{
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-width: 0;
}

#sp-gallery-grid .grid-item img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* размеры плиток */
#sp-gallery-grid .item-small{ grid-column: span 1; }
#sp-gallery-grid .item-wide { grid-column: span 2; }

/* tablet */
@media (max-width: 1024px){
  #sp-gallery-grid.gallery-grid{
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    gap: 22px;
    padding: 60px 0 80px;
  }

  /* чтобы не ломало сетку на 2 колонки */
  #sp-gallery-grid .item-wide{ grid-column: span 2; }
}

/* mobile — “интересно”: 2 колонки + wide высокий */
@media (max-width: 768px){
  #sp-gallery-grid.gallery-grid{
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
    gap: 14px;
    padding: 40px 0 60px;
  }

  #sp-gallery-grid .item-wide{
    grid-column: span 2;
    grid-row: span 2;           /* делает акцентный большой блок */
  }
}



/* =========================================
   PRIVATE EQUITY – SINGLE PORTFOLIO IMAGES
========================================= */

.page-private-equity .p-image img,
.page-private-equity .grid-item img,
.page-private-equity .card-image img
.page-private-equity {
    object-fit: contain !important;
}

.page-private-equity .grid-item img,
.page-private-equity {
    object-fit: cover !important;
}
/* =========================
   PRIVATE EQUITY – IMAGE FIT
========================= */
.page-private-equity #sp-hero-image,
.page-private-equity #sp-info-image {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

/* =====================================
   PRIVATE EQUITY — HERO & INFO IMAGES
   (override wrapper-level cover rules)
===================================== */

.page-private-equity .hero-media img,
.page-private-equity .info-media img {
    object-fit: contain !important;
}


