* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



:root {

    --primary-dark: #1a2332;

    --primary-blue: #2d3e50;

    --accent-gold: #d4af37;

    --accent-green: #669830;

    --text-white: #ffffff;

    --text-light: #b8c5d6;

    --bg-light: #f8f9fa;

    --bg-cream: #faf8f3;

    --hero-bg: #1a2e26;

}



html {

    scroll-behavior: smooth;

}



body {

    font-family: 'Inter', sans-serif;

    color: var(--primary-dark);

    line-height: 1.6;

    overflow-x: hidden;

	-webkit-hyphens: auto; /* Для Safari */

  -ms-hyphens: auto;     /* Для IE/Edge */

  hyphens: auto

}



h1, h2, h3 {

    font-family: 'Inter', sans-serif;

    letter-spacing: 2px;

}



/* Navigation */

.navbar {

    position: fixed;

    top: 0;

    left: 0;

    right: 0;

    z-index: 1000;

    padding: 25px 0;

    transition: all 0.3s ease;

    width: 100%;

}



.navbar.scrolled {

    background: rgba(26, 35, 50, 0.95);

    backdrop-filter: blur(10px);

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);

    padding: 15px 0;

}



.nav-container {

    max-width: 1400px;

    margin: 0 auto;

    padding: 0 40px;

    display: flex;

    justify-content: space-between;

    align-items: center;

}



.nav-logo img {

    height: 50px;

    transition: height 0.3s ease;

}



.logo-white {

    filter: brightness(0) invert(1);

}



.logo-color {

    filter: none;

}



.navbar.scrolled .nav-logo img {

    height: 45px;

}



.nav-menu {

    display: flex;

    list-style: none;

    gap: 40px;

    align-items: center;

}



.nav-menu a {

    color: var(--text-white);

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    transition: color 0.3s ease;

    position: relative;

    letter-spacing: 1px;

    text-transform: uppercase;

}



.nav-menu a:hover {

    color: var(--accent-green);

}



.nav-menu a.active::after {

    content: '';

    position: absolute;

    bottom: -5px;

    left: 0;

    right: 0;

    height: 2px;

    background: var(--accent-green);

}



.hamburger {

    display: none;

    flex-direction: column;

    cursor: pointer;

    gap: 5px;

}



.hamburger span {

    width: 30px;

    height: 3px;

    background: var(--text-white);

    transition: all 0.3s ease;

}



/* Hero Section */

.hero {

    min-height: 100vh;

    background: linear-gradient(135deg, #1a2e26 0%, #0d1912 100%);

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

    padding: 140px 40px 80px;

    overflow: hidden;

    width: 100%;

}



.hero-bg {

    position: absolute;

    inset: 0;

    background: url('../image/hero-bg.webp') center/cover no-repeat;

    opacity: 0.2;

    z-index: 0;

}



.hero-content {

    position: relative;

    z-index: 1;

    max-width: 900px;

    animation: fadeInUp 1s ease;

    width: 100%;

}



.hero-logo {

    margin-bottom: 40px;

    animation: fadeIn 1.2s ease;

}



.hero-logo img {

    height: 150px;

    width: auto;

    max-width: 100%;

}



.hero-divider {

    width: 200px;

    height: 1px;

    background: var(--accent-green);

    margin: 0 auto 40px;

    animation: expandWidth 1s ease 0.5s both;

    max-width: 90%;

}



.navbar.scrolled #nav-link-home {display: block; width: 80px; overflow: hidden;     animation: fadeIn 1s ease;}



@keyframes expandWidth {

    from { width: 0; }

    to { width: 200px; }

}



.hero h1 {

    font-size: clamp(26px, 3.6vw, 42px);

    font-weight: 600;

    color: var(--text-white);

    margin-bottom: 24px;

    line-height: 1.3;

    letter-spacing: 3px;

}



.hero p {

    font-size: clamp(16px, 2vw, 20px);

    color: var(--text-light);

    margin-bottom: 50px;

    letter-spacing: 1px;

}



.cta-button {

    display: inline-block;

    background: var(--accent-green);

    color: var(--text-white);

    padding: 18px 48px;

    border-radius: 50px;

    text-decoration: none;

    font-size: 16px;

    font-weight: 600;

    transition: all 0.3s ease;

    border: 2px solid var(--accent-green);

    cursor: pointer;

    white-space: nowrap;

    letter-spacing: 2px;

}



.cta-button:hover {

    background: transparent;

    color: var(--accent-green);

    transform: translateY(-3px);

    box-shadow: 0 10px 30px rgba(74, 124, 89, 0.3);

}



@keyframes fadeInUp {

    from {

        opacity: 0;

        transform: translateY(30px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}



@keyframes fadeIn {

    from { opacity: 0; }

    to { opacity: 1; }

}



/* Section Styles */

section {

    padding: 120px 40px;

    width: 100%;

}



.section-title {

    text-align: center;

    font-size: clamp(32px, 4vw, 48px);

    font-weight: 600;

    color: var(--primary-dark);

    margin-bottom: 20px;

    letter-spacing: 3px;

}



.section-subtitle {

    text-align: center;

    font-size: clamp(14px, 2vw, 18px);

    color: var(--accent-green);

    margin-bottom: 60px;

    letter-spacing: 1px;

}



.container {

    max-width: 1400px;

    margin: 0 auto;

    width: 100%;

}



/* Services Section */

.services {

    background: var(--bg-light);

}



.services-grid {

    display: grid;

    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));

    gap: 30px;

    margin-top: 60px;

    width: 100%;

}



.service-card {

    position: relative;

    height: 400px;

    border-radius: 24px;

    overflow: hidden;

    cursor: pointer;

    transition: all 0.4s ease;

    width: 100%;

}



.service-card::before {

    content: '';

    position: absolute;

    inset: 0;

    background: linear-gradient(to top, rgba(26, 35, 50, 0.95) 0%, transparent 60%);

    z-index: 1;

    transition: all 0.4s ease;

}



.service-card:hover {

    transform: translateY(-12px);

    box-shadow: 0 20px 40px rgba(74, 124, 89, 0.3);

}



.service-card:hover::before {

    background: linear-gradient(to top, rgba(26, 35, 50, 0.85) 0%, rgba(26, 35, 50, 0.3) 100%);

}



.service-card img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

}



.service-content {

    position: absolute;

    bottom: 0;

    left: 0;

    right: 0;

    padding: 40px 30px;

    z-index: 2;

}



.service-icon {

    font-size: 48px;

    color: var(--text-white);

    margin-bottom: 15px;

}



.service-icon i {

    font-size: 48px;

    font-weight: 300;

}



.service-card h3 {

    font-size: 24px;

    font-weight: 600;

    color: var(--text-white);

    letter-spacing: 2px;

}



/* Portfolio Section */

.portfolio-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 30px;

    margin-top: 60px;

    width: 100%;

}



.portfolio-item {

    position: relative;

    border-radius: 20px;

    overflow: hidden;

    cursor: pointer;

    height: 500px;

    width: 100%;

}



.portfolio-item:first-child {

    /*grid-row: span 2;

    height: 1030px;*/

}



.portfolio-item img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

    transition: transform 0.5s ease;

}



.portfolio-item:hover img {

    transform: scale(1.1);

}



.portfolio-overlay {

    position: absolute;

    inset: 0;

    background: rgba(26, 35, 50, 0.9);

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    opacity: 0;

    transition: opacity 0.4s ease;

}



.portfolio-item:hover .portfolio-overlay {

    opacity: 1;

}



.portfolio-overlay h3 {

    color: var(--text-white);

    font-size: 28px;

    margin-bottom: 15px;

    letter-spacing: 2px;

}



.portfolio-overlay p {

    color: var(--text-light);

    font-size: 16px;

    margin-bottom: 25px;

    letter-spacing: 1px;

}



.portfolio-btn {

    background: var(--accent-green);

    color: var(--text-white);

    padding: 12px 32px;

    border-radius: 50px;

    text-decoration: none;

    font-weight: 600;

    transition: all 0.3s ease;

    white-space: nowrap;

    letter-spacing: 2px;

    font-size: 14px;

}



.portfolio-btn:hover {

    background: var(--text-white);

    color: var(--accent-green);

}



/* About Section */

.about {

    background: var(--primary-dark);

}



.about .section-title {

    color: var(--text-white);

}



.about-content {

    display: grid;

    grid-template-columns: 40% 60%;

    gap: 60px;

    align-items: center;

    margin-top: 60px;

    width: 100%;

}



.about-image {

    position: relative;

    border-radius: 20px;

    overflow: hidden;

    height: 880px;

    width: 100%;

}



.about-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

}



.about-logo-overlay {

    position: absolute;

    bottom: 30px;

    left: 30px;

    background: rgba(255, 255, 255, 0.95);

    padding: 20px;

    border-radius: 12px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);

}



.about-logo-overlay img {

    height: 80px;

    width: auto;

    display: block;

}



.about-text {

    color: var(--text-white);

}



.about-text h2 {

    font-size: 36px;

    margin-bottom: 30px;

    font-weight: 600;

    letter-spacing: 2px;

}



.about-text p {

    font-size: 16px;

    line-height: 1.8;

    margin-bottom: 40px;

    color: var(--text-light);

}



.about-stats {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 40px;

    margin-top: 50px;

    padding-top: 50px;

    border-top: 1px solid rgba(74, 124, 89, 0.3);

}



.stat-item {

    text-align: center;

}



.stat-number {

    font-size: 56px;

    font-weight: 700;

    color: var(--accent-green);

    margin-bottom: 10px;

}



.stat-label {

    font-size: 14px;

    color: var(--text-light);

    letter-spacing: 1px;

}



.about-features {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 40px;

    margin-top: 60px;

}



.feature-item {

    text-align: center;

}



.feature-icon {

    font-size: 56px;

    color: var(--accent-green);

    margin-bottom: 20px;

}



.feature-icon i {

    font-size: 56px;

    font-weight: 300;

}



.feature-item h4 {

    font-size: 16px;

    color: var(--text-white);

    margin-bottom: 10px;

    letter-spacing: 2px;

}



.feature-item p {

    font-size: 14px;

    color: var(--text-light);

}



/* FAQ Section */

.faq {

    background: var(--bg-light);

}



.faq-container {

    max-width: 900px;

    margin: 60px auto 0;

    width: 100%;

}



.faq-item {

    background: var(--text-white);

    border-radius: 16px;

    margin-bottom: 16px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);

    overflow: hidden;

    width: 100%;

}



.faq-question {

    padding: 25px 30px;

    cursor: pointer;

    display: flex;

    justify-content: space-between;

    align-items: center;

    transition: all 0.3s ease;

}



.faq-question:hover {

    background: var(--bg-light);

}



.faq-question h3 {

    font-size: 18px;

    font-weight: 500;

    color: var(--primary-dark);

    flex: 1;

    letter-spacing: 0.5px;

}



.faq-icon {

    font-size: 24px;

    color: var(--accent-green);

    transition: transform 0.3s ease;

    min-width: 30px;

    text-align: center;

}



.faq-item.active .faq-icon {

    transform: rotate(45deg);

}



.faq-answer {

    max-height: 0;

    overflow: hidden;

    transition: max-height 0.3s ease;

}



.faq-answer-content {

    padding: 0 30px 25px;

    color: #666;

    font-size: 15px;

    line-height: 1.8;

}



.faq-item.active .faq-answer {

    max-height: 500px;

}



/* Pricing Section */

.pricing {

    background: var(--primary-dark);

}



.pricing .section-title {

    color: var(--text-white);

}



.pricing-content {

    display: grid;

    grid-template-columns: 60% 40%;

    gap: 60px;

    align-items: center;

    margin-top: 60px;

    width: 100%;

}



.pricing-text {

    color: var(--text-white);

}



.pricing-text h2 {

    font-size: 36px;

    margin-bottom: 30px;

    font-weight: 600;

    letter-spacing: 2px;

}



.pricing-text p {

    font-size: 18px;

    line-height: 1.8;

    color: var(--text-light);

    margin-bottom: 40px;

}



.pricing-list {

    list-style: none;

    counter-reset: pricing-counter;

}



.pricing-list li {

    font-size: 16px;

    color: var(--text-light);

    margin-bottom: 25px;

    padding-left: 60px;

    position: relative;

    counter-increment: pricing-counter;

}



.pricing-list li::before {

    content: counter(pricing-counter);

    position: absolute;

    left: 0;

    top: -5px;

    width: 45px;

    height: 45px;

    background: var(--accent-green);

    color: var(--text-white);

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;

    font-weight: 600;

}



.pricing-image {

    position: relative;

    border-radius: 20px;

    overflow: hidden;

    height: 600px;

    width: 100%;

}



.pricing-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    object-position: center;

}



/* Process Section */

.process {

    background: var(--bg-light);

}



.process-grid {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 40px;

    margin-top: 80px;

    width: 100%;

}



.process-card {

    background: var(--text-white);

    padding: 50px 35px;

    border-radius: 20px;

    text-align: center;

    position: relative;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    transition: all 0.4s ease;

    width: 100%;

}



.process-card:hover {

    transform: translateY(-10px);

    box-shadow: 0 15px 40px rgba(74, 124, 89, 0.2);

}



.process-number {

    position: absolute;

    top: -20px;

    right: 30px;

    font-size: 72px;

    font-weight: 700;

    color: var(--accent-green);

    opacity: 0.15;

    font-family: 'Inter', sans-serif;

}



.process-icon {

    font-size: 64px;

    color: var(--accent-green);

    margin-bottom: 25px;

}



.process-icon i {

    font-size: 64px;

    font-weight: 300;

}



.process-card h3 {

    font-size: 20px;

    color: var(--primary-dark);

    margin-bottom: 20px;

    font-weight: 600;

    letter-spacing: 2px;

}



.process-card p {

    font-size: 15px;

    color: #666;

    line-height: 1.7;

}



/* CTA Section */

.cta-section {

    background: linear-gradient(135deg, var(--primary-dark) 0%, #000 100%);

    position: relative;

    text-align: center;

    padding: 150px 40px;

    overflow: hidden;

    width: 100%;

}



.cta-bg {

    position: absolute;

    inset: 0;

    background: url('../image/cta-bg.webp') center/cover no-repeat;

    opacity: 0.2;

    z-index: 0;

}



.cta-content {

    position: relative;

    z-index: 1;

    max-width: 800px;

    margin: 0 auto;

    width: 100%;

}



.cta-section h2 {

    font-size: clamp(36px, 5vw, 52px);

    color: var(--text-white);

    margin-bottom: 20px;

    font-weight: 600;

    letter-spacing: 3px;

}



.cta-section p {

    font-size: clamp(16px, 2vw, 20px);

    color: var(--accent-green);

    margin-bottom: 50px;

    letter-spacing: 1px;

}



/* Footer */

.footer {

    background: var(--primary-dark);

    padding: 80px 40px 40px;

    position: relative;

    width: 100%;

}



.footer-watermark {

    position: absolute;

    top: 50%;

    left: 50%;

    transform: translate(-50%, -50%);

    font-size: 170px;

    font-weight: 700;

    color: rgba(255, 255, 255, 0.02);

    pointer-events: none;

    white-space: nowrap;

}



.footer-content {

    max-width: 1400px;

    margin: 0 auto;

    display: grid;

    grid-template-columns: 30% repeat(3, 1fr);

    gap: 60px;

    position: relative;

    z-index: 1;

    width: 100%;

}



.footer-column {

    width: 100%;

}



.footer-column h3 {

    color: var(--text-white);

    font-size: 16px;

    margin-bottom: 25px;

    font-weight: 600;

    letter-spacing: 2px;

}



.footer-logo {

    margin-bottom: 20px;

}



.footer-logo img {

    height: 80px;

    filter: brightness(0) invert(1);

}



.footer-divider {

    width: 100px;

    height: 2px;

    background: var(--accent-green);

    margin: 20px 0;

}



.footer-slogan {

    color: var(--text-light);

    font-size: 14px;

    line-height: 1.6;

}



.footer-info {

    color: var(--text-light);

    font-size: 14px;

    line-height: 1.8;

    margin-bottom: 12px;

}



.footer-info i {

    color: var(--accent-green);

    margin-right: 10px;

    width: 20px;

}



/* Scroll to Top Button */

.scroll-to-top {

    position: fixed;

    bottom: 40px;

    right: 40px;

    width: 56px;

    height: 56px;

    background: var(--accent-green);

    color: var(--text-white);

    border: none;

    border-radius: 50%;

    cursor: pointer;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 24px;

    opacity: 0;

    visibility: hidden;

    transition: all 0.3s ease;

    z-index: 999;

    box-shadow: 0 4px 20px rgba(74, 124, 89, 0.3);

}



.scroll-to-top.visible {

    opacity: 1;

    visibility: visible;

}



.scroll-to-top:hover {

    background: var(--primary-dark);

    transform: translateY(-5px);

    box-shadow: 0 8px 30px rgba(74, 124, 89, 0.4);

}



/* Responsive */

@media (max-width: 1024px) {

    .nav-menu {

        position: fixed;

        left: -100%;

        top: 0;

        flex-direction: column;

        background: var(--primary-dark);

        width: 100%;

        height: 100vh;

        text-align: center;

        transition: left 0.3s ease;

        padding-top: 100px;

        gap: 30px;

    }

	.footer-watermark {display: none; position: inherit}

    .nav-menu.active {

        left: 0;

    }



    .hamburger {

        display: flex;

        z-index: 1001;

    }



    .hamburger.active span:nth-child(1) {

        transform: rotate(45deg) translate(8px, 8px);

    }



    .hamburger.active span:nth-child(2) {

        opacity: 0;

    }



    .hamburger.active span:nth-child(3) {

        transform: rotate(-45deg) translate(8px, -8px);

    }



    .about-content,

    .pricing-content {

        grid-template-columns: 1fr;

    }



    .footer-content {

        grid-template-columns: repeat(2, 1fr);

    }



    .process-grid {

        grid-template-columns: repeat(2, 1fr);

    }



    .services-grid {

        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

    }

}



@media (max-width: 768px) {

    section {

        padding: 80px 20px;

    }



    .nav-container {

        padding: 0 20px;

    }



    .hero {

        padding: 120px 20px 60px;

    }



    .container {

        padding: 0;

    }



    .services-grid {

        grid-template-columns: 1fr;

        padding: 0;

    }



    .portfolio-grid {

        grid-template-columns: 1fr;

        padding: 0;

    }



    .portfolio-item:first-child {

        grid-row: span 1;

   height: auto;

    }



    .about-stats,

    .about-features {

        grid-template-columns: 1fr;

        gap: 30px;

    }



    .footer-content {

        grid-template-columns: 1fr;

        gap: 40px;

    }



    .cta-section {

        padding: 100px 20px;

    }



    .process-grid {

        grid-template-columns: 1fr;

        padding: 0;

    }



    .scroll-to-top {

        bottom: 20px;

        right: 20px;

        width: 48px;

        height: 48px;

        font-size: 20px;

    }



    .faq-container {

        padding: 0;

    }



    .pricing-content {

        padding: 0;

    }



    .hero-logo img {

        height: 160px;

    }



    .about-image {

        height: 400px;

    }



    .pricing-image {

        height: 400px;

    }

	    .hero-logo img, .hero-divider {



        display: none;

    }

	.nav-menu a {



		font-size: 140%;}

	

	.portfolio-item{

		height: auto;}

	

	

}



@media (max-width: 600px) {

    section {

        padding: 60px 15px;

        width: 100%;

    }



    .nav-container {

        padding: 0 15px;

        width: 100%;

    }



    .hero {

        padding: 100px 15px 50px;

        width: 100%;

    }



    .container {

        padding: 0;

        width: 100%;

        max-width: 100%;

    }



    .services-grid,

    .portfolio-grid,

    .process-grid {

        padding: 0;

        width: 100%;

    }



    .service-card,

    .portfolio-item,

    .process-card {

        margin: 0;

        width: 100%;

    }



    .faq-container,

    .pricing-content {

        padding: 0;

        width: 100%;

    }



    .faq-item {

        margin-left: 0;

        margin-right: 0;

        width: 100%;

    }



    .footer-content {

        padding: 0;

        width: 100%;

    }



    .footer-column {

        width: 100%;

    }



    .hero-logo img {

        height: 140px;

    }



    .about-image {

        height: 350px;

    }



    .pricing-image {

        height: 350px;

    }



    .faq-question {

        padding: 20px 20px;

    }



    .faq-answer-content {

        padding: 0 20px 20px;

    }



    .pricing-list li {

        padding-left: 55px;

        font-size: 15px;

    }



    .pricing-list li::before {

        width: 40px;

        height: 40px;

        font-size: 16px;

    }

	.footer-logo img {

    height: auto;

		width: 100%;}

}



@media (max-width: 400px) {

    section {

        padding: 50px 10px;

        width: 100%;

    }



    .nav-container {

        padding: 0 10px;

        width: 100%;

    }



    .hero {

        padding: 100px 10px 40px;

        width: 100%;

    }



    .container {

        padding: 0;

        width: 100%;

        max-width: 100%;

    }



    .services-grid,

    .portfolio-grid,

    .process-grid,

    .faq-container,

    .pricing-content,

    .about-content,

    .footer-content {

        padding: 0;

        width: 100%;

        margin-left: 0;

        margin-right: 0;

    }



    .service-card,

    .portfolio-item,

    .process-card,

    .faq-item,

    .about-image,

    .pricing-image {

        margin: 0;

        width: 100%;

    }



    .footer-column {

        width: 100%;

    }



    .cta-section {

        padding: 100px 10px;

        width: 100%;

    }



    .footer {

        padding: 60px 10px 30px;

        width: 100%;

    }



    .scroll-to-top {

        bottom: 15px;

        right: 15px;

        width: 44px;

        height: 44px;

        font-size: 18px;

    }



    .hero-logo img {

        height: 120px;

    }



    .about-image {

        height: 300px;

    }



    .pricing-image {

        height: 300px;

    }



    .faq-question {

        padding: 18px 15px;

    }



    .faq-question h3 {

        font-size: 16px;

    }



    .faq-answer-content {

        padding: 0 15px 18px;

        font-size: 14px;

    }



    .pricing-list li {

        padding-left: 50px;

        font-size: 14px;

    }



    .pricing-list li::before {

        width: 36px;

        height: 36px;

        font-size: 15px;

    }



    .process-card {

        padding: 40px 25px;

    }



    .service-content {

        padding: 30px 20px;

    }



    .about-logo-overlay {

        bottom: 20px;

        left: 20px;

        padding: 15px;

    }



    .about-logo-overlay img {

        height: 50px;

    }

}



/* Scroll animations */

.fade-in {

    opacity: 0;

    transform: translateY(30px);

    transition: opacity 0.6s ease, transform 0.6s ease;

}



.fade-in.visible {

    opacity: 1;

    transform: translateY(0);

}
/* ==========================================================================
   ПОЛНЫЙ БЛОК ПОРТФОЛИО И ГАЛЕРЕИ (ПАПКА /PORTFOLIO/)
   ========================================================================== */

/* 1. Контейнер сетки */
#portfolioGrid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 30px !important;
    margin-top: 50px !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 2. Карточка проекта */
.portfolio-item {
    position: relative;
    height: 400px;
    background-color: #1a1a1a;
    overflow: hidden;
    cursor: pointer;
    opacity: 1 !important; /* Принудительно показываем */
    transform: none !important;
    display: block !important;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

/* 3. Оверлей (текст при наведении) */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 25px;
    text-align: center;
    z-index: 5;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    color: #ffffff;
    font-size: 1.25rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 400;
}

.portfolio-overlay p {
    color: #669830;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.portfolio-link {
    color: #ffffff;
    font-size: 0.75rem;
    letter-spacing: 1px;
    border-bottom: 1px solid #669830;
    padding-bottom: 3px;
    text-transform: uppercase;
}

/* 4. Модальное окно (Галерея) */
.portfolio-modal {
    display: none; /* Включается через JS (style.display = 'flex') */
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-modal.active {
    opacity: 1;
}

.modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    user-select: none;
}

/* Кнопки управления */
.modal-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 45px;
    cursor: pointer;
    line-height: 1;
    z-index: 100;
}

.modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: 0.3s;
}

.modal-arrow:hover {
    background: #669830;
    color: #000;
}

.modal-arrow.prev { left: 20px; }
.modal-arrow.next { right: 20px; }

/* Инфо-блок под фото */
.modal-info {
    margin-top: 20px;
    text-align: center;
    color: #fff;
}

.modal-title {
    display: block;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.modal-counter {
    color: #666;
    font-size: 0.8rem;
    font-family: monospace;
}

/* 5. Адаптив */
@media (max-width: 768px) {
    #portfolioGrid {
        grid-template-columns: 1fr !important;
    }
    .portfolio-item {
        height: 300px;
    }
    .modal-arrow {
        display: none; /* На мобильных используем свайпы */
    }
}

/* Блокировка скролла при открытой галерее */
body.no-scroll {
    overflow: hidden !important;
}

./* ==========================================================================
   КРУПНЫЕ ПРЕВЬЮ: 3 В РЯД, ВЫСОТА 600PX, МАКСИМАЛЬНЫЙ ЗУМ
   ========================================================================== */

/* 1. Настройка сетки на 3 колонки */
#portfolioGrid {
    display: grid !important;
    /* Указываем строго 3 колонки, если позволяет ширина экрана */
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 20px !important;
    margin-top: 50px !important;
}

/* 2. Настройка контейнера карточки */
.portfolio-item {
    height: 600px !important; /* Ваше ограничение по высоте */
    position: relative;
    overflow: hidden; /* Обрезает всё, что выходит за границы при увеличении */
    background-color: #000;
}

/* 3. Увеличение самого изображения */
.portfolio-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    
    /* Делаем фото крупнее изначально (1.3 = +30% к размеру) */
    transform: scale(1.3); 
    
    /* Центрируем фокус */
    object-position: center !important;
    
    /* Плавный зум при наведении */
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* 4. Еще большее увеличение при наведении */
.portfolio-item:hover img {
    transform: scale(1.5) !important; 
}

/* 5. Адаптивность для небольших экранов */
@media (max-width: 1024px) {
    #portfolioGrid {
        grid-template-columns: repeat(2, 1fr) !important; /* 2 колонки на планшетах */
    }
}

@media (max-width: 768px) {
    #portfolioGrid {
        grid-template-columns: 1fr !important; /* 1 колонка на мобильных */
    }
    .portfolio-item {
        height: 450px !important; /* На мобильных 600px может быть многовато */
    }
}
/* ==========================================================================
   ИСПРАВЛЕНИЕ МИГАНИЯ В ГАЛЕРЕЕ (УБИРАЕМ ЗАДЕРЖКУ)
   ========================================================================== */

/* Убираем эффект исчезновения для самой картинки */
.modal-img {
    transition: none !important; /* Отключаем анимацию прозрачности при смене src */
    opacity: 1 !important;       /* Картинка всегда видима */
    background: transparent !important;
}

/* Оптимизация для быстрой отрисовки */
.portfolio-modal.active .modal-wrapper {
    will-change: transform;
}

/* Если в JS есть анимация fade-out перед сменой фото, 
   этот код её нейтрализует */
.modal-img.changing {
    opacity: 1 !important; 
}