/*
Theme Name: Геология-Сервис — версия 1.1
Theme URI: https://example.com/geology-service
Author: Custom theme
Description: Адаптивная одностраничная тема для ООО «Геология-Сервис» с перечнем услуг, редактируемым контентом и сортируемыми галереями.
Version: 1.1.7
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: geology-service
*/

:root {
	--blue: #2d67ec;
	--blue-dark: #1647bb;
	--orange: #ff6846;
	--ink: #111820;
	--navy: #0e2747;
	--muted: #65717e;
	--line: #dfe4ea;
	--wash: #f4f6f8;
	--white: #fff;
	--wrap: 1200px;
}

* { box-sizing: border-box; }
html { background: var(--white); scroll-behavior: smooth; scroll-padding-top: 92px; }
body { min-width: 0; margin: 0; overflow-x: hidden; background: var(--white); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
.site-main { overflow: clip; }
body.lightbox-open { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.wrap { width: min(var(--wrap), calc(100% - 48px)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 10000; background: #fff; padding: 12px 16px; box-shadow: 0 4px 20px #0003; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: 88px; display: flex; align-items: center; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { display: grid; grid-template-columns: 235px 1fr 270px; align-items: center; gap: 24px; min-height: 88px; }
.brand, .brand > a { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { position: relative; width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; color: var(--blue); border: 2px solid var(--blue); border-radius: 11px; font-size: 12px; }
.brand-mark::after { content: ""; position: absolute; right: -6px; bottom: 7px; width: 10px; height: 3px; background: var(--orange); }
.custom-logo-wrap img { display: block; max-width: 210px; max-height: 58px; width: auto; }
.custom-logo-wrap .custom-logo-link { display: block; }
.site-nav { display: flex; justify-content: center; align-items: center; gap: clamp(12px, 1.8vw, 28px); font-size: 12px; font-weight: 750; white-space: nowrap; }
.site-nav a, .header-contacts a, .site-footer a { transition: color .2s ease; }
.site-nav a:hover, .site-nav a:focus-visible, .header-contacts a:hover, .site-footer a:hover { color: var(--blue); }
.header-contacts { font-size: 11px; line-height: 1.7; text-align: right; font-weight: 700; }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 9px; background: var(--wash); }
.menu-toggle > span:not(.screen-reader-text) { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

.hero { padding: clamp(54px, 6vw, 82px) 0 45px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: start; }
.hero-copy { max-width: none; }
h1, h2 { overflow-wrap: anywhere; text-wrap: balance; }
h1 { margin: 0 0 25px; max-width: none; font-size: clamp(39px, 4.1vw, 58px); line-height: 1.04; letter-spacing: -.048em; }
h1 span { color: var(--blue); }
.lead { max-width: none; color: #323d48; font-size: 17px; line-height: 1.58; }
.hero-copy > ul { columns: 2; column-gap: 30px; padding-left: 20px; margin: 22px 0 25px; color: #34404b; font-size: 14px; line-height: 1.52; }
.hero-copy li { break-inside: avoid; margin-bottom: 7px; }
.hero-note { max-width: none; margin: 0 0 24px; color: #3c4651; font-size: 14px; line-height: 1.55; }
.primary-button { display: inline-flex; align-items: center; gap: 18px; padding: 16px 22px; color: #fff; background: var(--blue); border-radius: 9px; font-size: 14px; font-weight: 800; box-shadow: 0 8px 20px rgba(45,103,236,.18); transition: background .2s, transform .2s; }
.primary-button:hover, .primary-button:focus-visible { background: var(--blue-dark); transform: translateY(-1px); }
.primary-button span { font-size: 20px; line-height: 1; }
.hero-photo { position: relative; min-width: 0; display: block; width: 100%; height: clamp(360px, 42vw, 520px); overflow: hidden; border-radius: 17px; background: #dfe4ea; }
.hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.zoom-icon { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--ink); background: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 6px 18px #0002; opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s; }
.gallery-item:hover .zoom-icon, .gallery-item:focus-visible .zoom-icon, .hero-photo .zoom-icon { opacity: 1; transform: none; }

.stats { display: grid; gap: 12px; margin-top: 34px; }
.stats-four { grid-template-columns: repeat(4, 1fr); }
.stats-three { grid-template-columns: repeat(3, 1fr); margin: 34px 0; }
.stat { min-height: 116px; padding: 23px 20px; }
.stat strong { display: block; margin-bottom: 8px; color: var(--blue); font-size: clamp(25px, 2.4vw, 33px); line-height: 1; font-weight: 400; letter-spacing: -.04em; }
.stat span { color: var(--ink); font-size: 13px; line-height: 1.43; }

.section { padding: clamp(70px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.section-gray { background: var(--wash); }
.section-head { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(42px, 6vw, 74px); align-items: start; margin-bottom: 45px; }
.kicker { margin-bottom: 14px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h2 { margin: 0 0 14px; font-size: clamp(34px, 3.7vw, 49px); line-height: 1.07; letter-spacing: -.043em; }
.subtitle { max-width: 620px; color: var(--muted); font-size: clamp(18px, 1.8vw, 22px); line-height: 1.38; }
.copy p { margin: 0 0 17px; color: #35404c; font-size: 16px; line-height: 1.64; }
.copy p:last-child { margin-bottom: 0; }
.accent-heading { padding-left: 25px; border-left: 6px solid; }
.blue-accent { border-color: var(--blue); }
.orange-accent { border-color: var(--orange); }

.photo-gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 205px; grid-auto-flow: dense; gap: 12px; }
.gallery-item { position: relative; grid-column: span 3; display: block; overflow: hidden; border-radius: 11px; background: #dde3e9; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.gallery-item:hover img { transform: scale(1.025); }
.photo-gallery > .gallery-item:first-child { grid-column: span 6; grid-row: span 2; }
.photo-gallery > .gallery-item:nth-child(4) { grid-column: span 6; }
.photo-gallery > .gallery-item:first-child:nth-last-child(3) { grid-column: span 4; grid-row: span 2; }
.photo-gallery > .gallery-item:first-child:nth-last-child(3) ~ .gallery-item { grid-column: span 8; }
.photo-gallery > .gallery-item:first-child:nth-last-child(6) { grid-column: span 4; }
.photo-gallery > .gallery-item:first-child:nth-last-child(6) ~ .gallery-item { grid-column: span 4; }

.spec-grid { display: grid; grid-template-columns: 1fr 300px; gap: 14px; margin: 36px 0 42px; }
.spec, .tech { padding: 29px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.section-gray .spec, .section-gray .tech { background: transparent; }
.spec h3, .tech h3 { margin: 0 0 16px; font-size: 16px; }
.spec ul, .tech ul { columns: 2; column-gap: 36px; margin: 0; padding-left: 18px; color: #394550; font-size: 14px; line-height: 1.56; }
.spec li, .tech li { break-inside: avoid; margin-bottom: 8px; }
.tech { margin-top: 26px; }
.mini-stats { display: grid; gap: 12px; }
.mini { padding: 21px; border: 1px solid var(--line); border-radius: 13px; }
.mini strong { display: block; margin-bottom: 7px; font-size: 27px; line-height: 1; font-weight: 500; letter-spacing: -.035em; }
.mini.blue strong { color: var(--blue); }
.mini.orange strong { color: var(--orange); }
.mini span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.experience-subtitle { margin-bottom: 10px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 42px; }

.services-section { background: var(--wash); color: var(--ink); }
.services-head { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(42px, 6vw, 74px); align-items: start; margin-bottom: 40px; }
.services-section .copy p { color: #45515e; }
.services-list { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.services-list li { position: relative; min-height: 0; padding: 18px 0 18px 32px; color: #303c48; background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 15px; line-height: 1.5; }
.services-list li::before { content: "—"; position: absolute; left: 0; top: 18px; color: var(--blue); font-size: 16px; font-weight: 800; }

.safety-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(35px, 5vw, 60px); align-items: stretch; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 27px; }
.principle { min-height: 75px; display: flex; align-items: center; gap: 12px; padding: 19px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; line-height: 1.4; font-weight: 700; }
.principle > span { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.safety-card { position: relative; min-height: 420px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 50px; color: #fff; background: linear-gradient(145deg, var(--blue), #173f9d); border-radius: 17px; }
.safety-card::before { content: ""; position: absolute; width: 320px; height: 320px; right: -110px; top: -120px; border: 66px solid #ffffff12; border-radius: 50%; }
.shield { position: relative; width: 88px; height: 100px; display: grid; place-items: center; border: 4px solid #fff; border-radius: 50% 50% 46% 46%/38% 38% 62% 62%; font-size: 39px; font-weight: 800; }
.safety-card p { position: relative; max-width: 430px; margin: 70px 0 0; font-size: clamp(20px, 2vw, 25px); line-height: 1.35; font-weight: 800; }

.contact-section { padding: clamp(72px, 7vw, 96px) 0 0; }
.contact-grid { display: grid; grid-template-columns: .84fr 1.16fr; gap: 18px; margin-top: 38px; }
.contact-card { padding: 37px; background: var(--wash); border-radius: 14px; }
.contact-card h3 { margin: 0 0 19px; font-size: 19px; }
.contact-card p { margin: 0 0 18px; color: #394551; font-size: 14px; line-height: 1.58; }
.contact-card p a { overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #9ca8b5; text-underline-offset: 3px; }
.contact-lines { display: grid; gap: 16px; margin-top: 23px; padding-top: 21px; border-top: 1px solid #ccd3db; font-size: 16px; font-weight: 800; }
.contact-row { display: grid; gap: 5px; }
.contact-label { color: var(--muted); font-size: 11px; line-height: 1.35; font-weight: 600; }
.contact-lines a:hover { color: var(--blue); }
.requisites { margin-top: 25px !important; }
.map-wrap { min-height: 505px; overflow: hidden; border-radius: 14px; background: #e9edf2; }
.map-wrap iframe { display: block; min-height: 505px; border: 0; }

.site-footer { margin-top: 56px; padding: 39px 0; color: #b9c6d5; background: var(--navy); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr 1fr 1fr; gap: 35px; font-size: 11px; line-height: 1.6; }
.footer-grid > div { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; overflow-wrap: anywhere; }
.footer-grid strong { display: block; margin-bottom: 7px; color: #fff; font-size: 12px; }
.footer-contact-label { margin-top: 7px; color: #8495a8; font-size: 9px; line-height: 1.35; }
.entry-content { min-height: 50vh; }

.lightbox[hidden] { display: none; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; color: #fff; background: rgba(5,10,17,.96); }
.lightbox-stage { min-width: 0; height: 100vh; display: grid; place-items: center; padding: 32px 0; }
.lightbox-stage img { grid-area: 1/1; display: block; max-width: 100%; max-height: calc(100vh - 64px); width: auto; height: auto; object-fit: contain; user-select: none; box-shadow: 0 14px 60px #0008; }
.lightbox-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); padding: 6px 10px; border-radius: 20px; background: #0008; font-size: 12px; }
.lightbox button { z-index: 2; width: 54px; height: 54px; justify-self: center; padding: 0; border: 1px solid #ffffff55; border-radius: 50%; color: #fff; background: #ffffff12; font-size: 42px; line-height: 1; cursor: pointer; }
.lightbox button:hover, .lightbox button:focus-visible { background: #ffffff26; }
.lightbox-close { position: absolute; top: 15px; right: 15px; font-size: 32px !important; }

@media (max-width: 1120px) {
	.header-inner { grid-template-columns: 210px 1fr 210px; gap: 14px; }
	.site-nav { gap: 14px; font-size: 11px; }
	.header-contacts { font-size: 10px; }
}

@media (max-width: 900px) {
	html { scroll-padding-top: 75px; }
	.wrap { width: min(100% - 40px, var(--wrap)); }
	.site-header, .header-inner { min-height: 74px; }
	.header-inner { position: relative; grid-template-columns: 1fr auto; }
	.menu-toggle { display: block; }
	.menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
	.menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
	.site-nav { position: absolute; left: 0; right: 0; top: calc(100% + 1px); display: none; align-items: stretch; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 12px 12px; box-shadow: 0 14px 28px #18212b1a; white-space: normal; }
	.site-nav.is-open { display: grid; }
	.site-nav a { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
	.site-nav a:last-child { border: 0; }
	.header-contacts { display: none; }
	.hero-grid, .section-head, .services-head, .safety-grid, .contact-grid { grid-template-columns: 1fr; }
	.hero-photo { height: min(64vw, 520px); order: -1; }
	.stats-four { grid-template-columns: 1fr 1fr; }
	.section-head { gap: 25px; }
	.photo-gallery { grid-auto-rows: 160px; }
	.spec-grid { grid-template-columns: 1fr; }
	.mini-stats { grid-template-columns: 1fr 1fr; }
	.result-grid { grid-template-columns: 1fr; }
	.safety-card { min-height: 350px; }
	.map-wrap, .map-wrap iframe { min-height: 430px; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
	.wrap { width: min(100% - 28px, var(--wrap)); }
	.brand { font-size: 14px; }
	.brand-mark { width: 36px; height: 36px; }
	.hero { padding-top: 28px; }
	.hero-photo { height: 68vw; min-height: 260px; border-radius: 12px; }
	h1 { font-size: clamp(31px, 8vw, 42px); }
	.hero-copy > ul { columns: 1; }
	.stats-four, .stats-three { grid-template-columns: 1fr 1fr; }
	.stat { min-height: 105px; padding: 17px 8px; }
	.photo-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; gap: 8px; }
	.photo-gallery > .gallery-item, .photo-gallery > .gallery-item:first-child, .photo-gallery > .gallery-item:nth-child(4), .photo-gallery > .gallery-item:first-child:nth-last-child(3), .photo-gallery > .gallery-item:first-child:nth-last-child(3) ~ .gallery-item, .photo-gallery > .gallery-item:first-child:nth-last-child(6), .photo-gallery > .gallery-item:first-child:nth-last-child(6) ~ .gallery-item { grid-column: span 1; grid-row: span 1; }
	.photo-gallery > .gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
	.spec, .tech { padding: 22px; }
	.spec ul, .tech ul { columns: 1; }
	.mini-stats { grid-template-columns: 1fr 1fr; }
	.principles { grid-template-columns: 1fr; }
	.safety-card { min-height: 340px; padding: 34px; }
	.contact-card { padding: 26px; }
	.map-wrap, .map-wrap iframe { min-height: 360px; }
	.footer-grid { grid-template-columns: 1fr; gap: 25px; }
	.lightbox { grid-template-columns: 52px 1fr 52px; }
	.lightbox button { width: 42px; height: 42px; font-size: 34px; }
	.lightbox-stage { padding: 65px 0 55px; }
	.lightbox-stage img { max-height: calc(100vh - 120px); }
}

@media (max-width: 390px) {
	.stats-four, .stats-three, .mini-stats { grid-template-columns: 1fr; }
	.photo-gallery { grid-template-columns: 1fr; }
	.photo-gallery > .gallery-item, .photo-gallery > .gallery-item:first-child { grid-column: span 1; grid-row: span 1; }
	.photo-gallery > .gallery-item:first-child { height: 260px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
