/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a:not([class]) {
    color: var(--color-accent-green);
    text-decoration: none;
    transition: var(--transition-default);
}

a:not([class]):hover {
    color: #027e28;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: var(--spacing-xxl) 0;
    position: relative;
}

/* Section Titles */
.section-title {
    font-size: var(--font-size-h2);
    margin-bottom: var(--spacing-md);
    position: relative;
}

.title-decoration {
    width: 80px;
    height: 4px;
    background: var(--gradient-green);
    margin: var(--spacing-sm) auto;
    clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
}

/* Header Styles */
.header {
    background: var(--color-white);
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-sm);
    z-index: var(--z-header);
    transition: var(--transition-default);
}

.header.scrolled {
    padding: var(--spacing-xs) 0;
    box-shadow: var(--shadow-md);
}

.logo img {
    height: 50px;
    width: auto;
}

.main-nav .nav-link {
    color: var(--color-text-primary);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    position: relative;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent-green);
    transition: var(--transition-default);
    transform: translateX(-50%);
}

.main-nav .nav-link:hover::after {
    width: 80%;
}

.header-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.header-phone-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.header-phone-group a {
    color: var(--color-accent-green);
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
}

.phone-separator {
    color: var(--color-text-secondary);
    font-size: 14px;
}

.header-phone-group a:hover {
    color: var(--color-primary-yellow);
}

.header-email-icon {
    display: flex;
    align-items: center;
}

.header-email-icon a {
    color: var(--color-text-secondary);
    display: inline-flex;
    align-items: center;
    transition: var(--transition-default);
}

.header-email-icon a:hover {
    color: var(--color-primary-yellow);
    transform: translateY(-2px);
}

/* Header Diagonal */
.header-diagonal {
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: var(--color-white);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 0);
    z-index: 1;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: relative;
    flex-shrink: 0;
}

.mobile-menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--color-accent-green);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-nav {
    padding: 80px 30px 30px;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
}

.mobile-nav ul li {
    margin-bottom: 20px;
}

.mobile-nav-link {
    display: block;
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--color-accent-green);
    border-bottom-color: var(--color-accent-green);
    transform: translateX(5px);
}

.mobile-menu-contacts {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.mobile-menu-contacts a {
    color: var(--color-accent-green);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mobile-menu-contacts a:hover {
    color: var(--color-primary-yellow);
    transform: translateX(5px);
}

/* Hero Section */
.hero-section {
    min-height: 660px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
    padding-top: 100px;
    padding-bottom: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-height: 600px;
    background-image: url('../img/hero_bg.webp');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    z-index: -2;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 20, 40, 0.3) 0%, rgba(0, 51, 102, 0.4) 100%);
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="0" x2="100" y2="100" stroke="%23ffed99" stroke-width="0.5" opacity="0.1"/><line x1="100" y1="0" x2="0" y2="100" stroke="%2301a133" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 100px 100px;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: var(--z-content);
    color: var(--color-white);
}

.hero-title {
    font-size: var(--font-size-h1);
    margin-bottom: var(--spacing-md);
    color: var(--color-primary-yellow);
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: var(--spacing-lg);
    color: var(--color-light-bg);
}

.hero-diagonal {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--color-white);
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
    z-index: 1;
}

/* Sharp Button Styles */
.btn-sharp {
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    padding: 14px 40px;
    font-weight: 600;
    border: none;
    transition: var(--transition-default);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-green);
    color: var(--color-white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.1);
}

/* Services Section */
.services-section {
    background: var(--color-light-bg);
    padding: var(--spacing-xxl) 0;
}

.service-card {
    background: var(--color-white);
    padding: var(--spacing-lg);
    text-align: center;
    clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    transition: var(--transition-default);
    height: 100%;
 
}

.service-card:hover {
    transform: translateY(-10px) skewY(-1deg);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 200px;
    height: 200px;
    margin: 0 auto var(--spacing-md);
    position: relative;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: var(--transition-default);
}

.service-icon svg path {
    fill: var(--color-accent-green);
    transition: var(--transition-default);
}

.service-card:hover .service-icon svg {
    transform: scale(1.1);
    
}


.service-card:hover .service-icon svg path {
    fill: #006622;

}



.service-icon .icon-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 36px;
    z-index: 1;
}

.service-icon .icon-content img {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.service-title {
    font-size: 18px;
    color: var(--color-text-primary);
    margin: 0;
}

/* About Section */
.about-section {
    position: relative;
    padding: var(--spacing-xxl) 0;
    overflow: hidden;
}

.about-diagonal-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: var(--gradient-yellow);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
    opacity: 0.3;
    z-index: -1;
}

.about-content {
    padding-right: var(--spacing-lg);
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-primary);
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.stat-item {
    position: relative;
    padding: var(--spacing-md);
    background: var(--color-white);
    clip-path: polygon(20px 0, 100% 0, calc(100% - 20px) 100%, 0 100%);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 48px;
    font-family: var(--font-heading);
    color: var(--color-accent-green);
    line-height: 1;
}

.stat-label {
    font-size: 16px;
    color: var(--color-text-secondary);
    margin-top: var(--spacing-xs);
}

.stat-decoration {
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent var(--color-primary-yellow) transparent transparent;
}

/* Triangle Decorations */
.triangle-decoration {
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    z-index: 0;
}

.triangle-1 {
    top: 10%;
    left: 5%;
    border-width: 0 0 60px 60px;
    border-color: transparent transparent var(--color-primary-yellow) transparent;
    opacity: 0.5;
}

.triangle-2 {
    bottom: 15%;
    right: 8%;
    border-width: 60px 60px 0 0;
    border-color: var(--color-accent-green) transparent transparent transparent;
    opacity: 0.3;
}

/* Projects Section */
.projects-section {
    background: var(--color-light-bg);
    padding: 30px 0;
}

.project-card {
    position: relative;
    overflow: hidden;
    clip-path: polygon(25px 0, 100% 0, calc(100% - 25px) 100%, 0 100%);
    cursor: pointer;
    height: 350px;
}

.project-image {
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    background-size: cover;
    background-position: center;
    position: relative;
    transition: var(--transition-default);
}


.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    transform: translateY(20px);
    transition: var(--transition-default);
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-info {
    position: relative;
}

.project-title {
    color: var(--color-white);
    font-size: 20px;
    margin: 0;
}

.project-diagonal {
    width: 60px;
    height: 3px;
    background: var(--color-primary-yellow);
    margin-top: var(--spacing-xs);
    clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

/* Subsection Cards */
.subsections-grid {
    margin-top: var(--spacing-lg);
}

.subsection-card {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--gradient-green);
    clip-path: polygon(25px 0, 100% 0, calc(100% - 25px) 100%, 0 100%);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-default);
    min-height: 120px;
    padding: var(--spacing-md) var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.subsection-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, #008028 0%, #006622 100%);
}

.subsection-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.subsection-title {
    color: var(--color-white);
    font-size: var(--font-size-h3);
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    transition: var(--transition-default);
}

.subsection-card:hover .subsection-title {
    color: var(--color-primary-yellow);
}

.subsection-diagonal {
    width: 60px;
    height: 3px;
    background: var(--color-primary-yellow);
    margin-top: var(--spacing-xs);
    clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
    transition: var(--transition-default);
}

.subsection-card:hover .subsection-diagonal {
    width: 80px;
    background: var(--color-white);
}

/* Responsive Styles for Subsection Cards */
@media (max-width: 991px) {
    .subsection-card {
        min-height: 100px;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .subsection-title {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .subsection-card {
        min-height: 90px;
        padding: var(--spacing-sm);
    }
    
    .subsection-title {
        font-size: 18px;
    }
    
    .subsection-diagonal {
        width: 50px;
        height: 2px;
    }
}

/* CTA Section */
.cta-section {
    position: relative;
    padding: var(--spacing-xxl) 0;
    overflow: hidden;
}

.cta-diagonal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0 100%);
    z-index: -1;
}

.cta-diagonal-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><line x1="0" y1="0" x2="100" y2="100" stroke="%23ffed99" stroke-width="0.5" opacity="0.1"/><line x1="100" y1="0" x2="0" y2="100" stroke="%2301a133" stroke-width="0.5" opacity="0.1"/></svg>');
    background-size: 100px 100px;
}

.cta-content {
    position: relative;
    z-index: var(--z-content);
}

.cta-subtitle {
    color: var(--color-light-bg);
    margin-bottom: var(--spacing-lg);
}

.cta-form {
    margin-top: var(--spacing-lg);
}

.form-control-sharp {
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    border: 2px solid var(--color-primary-yellow);
    padding: 14px 20px;
    font-size: 16px;
    background: var(--color-white);
    transition: var(--transition-default);
}

.form-control-sharp:focus {
    border-color: var(--color-accent-green);
    box-shadow: 0 0 0 0.2rem rgba(1, 161, 51, 0.25);
    outline: none;
}

/* Footer */
.footer {
    background: var(--color-dark-bg);
    color: var(--color-light-bg);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter: brightness(1.2);
}

.footer-title {
    color: var(--color-primary-yellow);
    font-size: 18px;
    margin-bottom: var(--spacing-sm);
    font-family: var(--font-heading);
}

.footer-contacts,
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contacts li,
.footer-nav li {
    margin-bottom: var(--spacing-xs);
}

.footer-contacts a,
.footer-nav a {
    color: var(--color-light-bg);
    transition: var(--transition-default);
}

.footer-contacts a:hover,
.footer-nav a:hover {
    color: var(--color-primary-yellow);
    padding-left: 5px;
}

.footer-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
    color: var(--color-text-light);
}

/* Breadcrumbs Section */
.breadcrumbs-section {
    padding: 120px 0 20px 0;
    background: var(--color-light-bg);
}

.breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--color-accent-green);
    text-decoration: none;
    transition: var(--transition-default);
}

.breadcrumb-item a:hover {
    color: var(--color-primary-yellow);
}

.breadcrumb-item.active {
    color: var(--color-text-secondary);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "→";
    color: var(--color-text-secondary);
}

/* Content Section */
.content-section {
    background: var(--color-light-bg);
    padding: 30px 0 30px;
}

.content-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-primary);
}

.content-text p {
    margin-bottom: var(--spacing-md);
}

/* Project Link */
.project-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-link:hover {
    text-decoration: none;
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 1365px) {
    section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-section {
        min-height: 600px;
    }
    
    .hero-background {
        max-height: 550px;
    }
    
    .stat-number {
        font-size: 40px;
    }
}

@media (max-width: 991px) {
    .main-nav {
        display: none;
    }
    
    .about-diagonal-bg {
        width: 80%;
    }
    
    .about-content {
        padding-right: 0;
        margin-bottom: var(--spacing-lg);
    }
}


@media (max-width: 767px) {
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .hero-section {
        min-height: 500px;
        padding-top: 80px;
        padding-bottom: 60px;
    }
    
    .hero-background {
        max-height: 500px;
    }
    
    .hero-diagonal {
        height: 60px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .service-card {
        padding: var(--spacing-md);
        clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    }
    
    .service-icon {
        width: 150px;
        height: 150px;
    }
    
    .service-icon .icon-content {
        font-size: 28px;
    }
    
    .service-icon .icon-content img {
        height: 60px;
        width: auto;
    }
    
    .stat-item {
        clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .project-card {
        height: 250px;
        clip-path: polygon(15px 0, 100% 0, calc(100% - 15px) 100%, 0 100%);
    }
    
    .breadcrumbs-section {
        padding: 100px 0 20px;
    }
    
    .logo img {
        height: 40px;
    }
}

@media (max-width: 575px) {
    .btn-sharp {
        padding: 12px 30px;
    }
    
    .about-diagonal-bg {
        display: none;
    }
}

/* Page Header Section - универсальная секция с заголовком */
.page-header-section {
    background: var(--color-light-bg);
    padding: var(--spacing-md) 0 0 0;
}

/* Page Content Section - универсальная секция с произвольным содержанием */
.page-content-section {
    background: var(--color-light-bg);
    padding: var(--spacing-md) 0 var(--spacing-xxl) 0;
}

/* Services Detailed Section */
.services-detailed-section {
    background: var(--color-light-bg);
    padding: 0 0 var(--spacing-xxl);
}

.service-item-detailed {
    position: relative;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg) 0;
}

.service-item-row {
    position: relative;
    z-index: 1;
}

.service-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    position: relative;
}

.service-icon-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: #01a133;
 
    clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
    transition: var(--transition-default);
}

.service-item-detailed:hover .service-icon-wrapper::before {
    transform: translate(-50%, -50%) rotate(15deg) scale(1.1);
    background: #006622;
}

.service-icon-wrapper img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    transition: var(--transition-default);
}

.service-item-detailed:hover .service-icon-wrapper img {
    transform: scale(1.1);
}

.service-content {
    padding: var(--spacing-md);
}

.service-title-detailed {
    font-size: 24px;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.service-title-detailed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent-green);
    clip-path: polygon(0 0, 95% 0, 100% 100%, 5% 100%);
}

.service-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-primary);
    margin: 0;
}

/* Decorative Elements */
.service-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

.service-decoration-1::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: var(--gradient-yellow);
    opacity: 0.05;
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

.service-decoration-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: var(--gradient-green);
    opacity: 0.05;
    clip-path: polygon(0 0, 70% 0, 100% 100%, 0 100%);
}

/* Hover Effect */
.service-item-detailed {
    transition: var(--transition-default);
}

.service-item-detailed:hover {
    transform: translateY(-5px);
}

.service-item-detailed:hover .service-decoration-1::before,
.service-item-detailed:hover .service-decoration-2::before {
    opacity: 0.08;
}

/* Responsive Styles for Services Detailed */
@media (max-width: 767px) {
    .service-icon-wrapper {
        margin-bottom: var(--spacing-md);
    }
    
    .service-icon-wrapper::before {
        width: 140px;
        height: 140px;
    }
    
    .service-icon-wrapper img {
        width: 90px;
        height: 90px;
    }
    
    .service-title-detailed {
        font-size: 20px;
    }
    
    .service-description {
        font-size: 15px;
    }
    
    .service-item-detailed {
        margin-bottom: var(--spacing-lg);
        padding: var(--spacing-md) 0;
    }
    
    /* On mobile, always show icon on top */
    .service-item-row.reverse .col-md-4 {
        order: 1 !important;
    }
    
    .service-item-row.reverse .col-md-8 {
        order: 2 !important;
    }
}

@media (max-width: 575px) {
    .service-content {
        padding: var(--spacing-sm);
    }
    
    .service-title-detailed {
        font-size: 18px;
    }
    
    .service-icon-wrapper::before {
        width: 120px;
        height: 120px;
    }
    
    .service-icon-wrapper img {
        width: 80px;
        height: 80px;
    }
}

/* Gallery Styles */
.popup-gallery {
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.popup-gallery::after {
    content: '';
    display: block;
    clear: both;
}

.popup-gallery .gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: calc(33.333% - 8px);
    margin-right: 12px;
    margin-bottom: 12px;
    float: left;
}

.popup-gallery .gallery-item:nth-child(3n) {
    margin-right: 0;
}

@media (min-width: 992px) {
    .popup-gallery .gallery-item {
        width: calc(33.333% - 8px);
    }
    
    .popup-gallery .gallery-item:nth-child(3n) {
        margin-right: 0;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .popup-gallery .gallery-item {
        width: calc(50% - 6px);
    }
    
    .popup-gallery .gallery-item:nth-child(3n) {
        margin-right: 12px;
    }
    
    .popup-gallery .gallery-item:nth-child(2n) {
        margin-right: 0;
    }
}

@media (max-width: 575px) {
    .popup-gallery .gallery-item {
        width: 100%;
        margin-right: 0;
    }
    
    .popup-gallery .gallery-item:nth-child(3n),
    .popup-gallery .gallery-item:nth-child(2n) {
        margin-right: 0;
    }
}

.popup-gallery .gallery-item:hover {
    transform: translateY(-5px);
}

.popup-gallery .gallery-item img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    display: block;
    width: 100%;
    height: auto;
}

.popup-gallery .gallery-item:hover img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.popup-gallery .gallery-item a {
    display: block;
    text-decoration: none;
}

/* Smooth loading animation for gallery items */
.popup-gallery .gallery-item {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.popup-gallery .gallery-item:nth-child(1) { animation-delay: 0.1s; }
.popup-gallery .gallery-item:nth-child(2) { animation-delay: 0.2s; }
.popup-gallery .gallery-item:nth-child(3) { animation-delay: 0.3s; }
.popup-gallery .gallery-item:nth-child(4) { animation-delay: 0.1s; }
.popup-gallery .gallery-item:nth-child(5) { animation-delay: 0.2s; }
.popup-gallery .gallery-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

