/* Custom WordPress theme fixes */

/* Modern wider container for large screens */
.container {
    width: 100%;
}

@media (min-width: 1200px) {
    .container {
        max-width: 1400px !important;
        width: 1400px !important;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px !important;
        width: 1600px !important;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1800px !important;
        width: 1800px !important;
    }
}

/* Ensure container-fluid is truly full width */
.container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* Fix banner layout - allow negative margin to overlay under header */
.container-fluid.mainphead {
    margin-bottom: 0 !important;
    /* Keep original negative margin for overlay effect */
    position: relative;
    padding-bottom: 0 !important; /* Remove fixed padding, use JS instead */
}

/* Fix header visibility - ensure it's above banner with transparent background */
header {
    position: relative;
    z-index: 100;
}

.container-fluid.wrapsh {
    background: transparent !important;
}

.shapka {
    background: transparent !important;
}

/* Header contacts styling */
.headkontakty {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 10px;
}

.headkontakty p.konts {
    margin: 0 15px 0 0;
    font-size: 14px;
}

.headkontakty p.konts a {
    color: #70bce9;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.headkontakty p.konts a:hover {
    color: #fff;
}

.headkontakty p.konts i {
    margin-right: 5px;
}

/* Menu and buttons wrapper */
.headnavwrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Header buttons styling */
.headbuttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.linkobrzvon, .linkzam {
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.linkobrzvon p {
    background-color: #fff;
    color: #000;
    padding: 8px 15px !important;
    margin: 0 !important;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.linkobrzvon:hover p {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.linkzam p {
    background-color: #1684c6 !important;
    color: #fff;
    padding: 8px 15px !important;
    margin: 0 !important;
    border-radius: 5px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    white-space: nowrap;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.linkzam:hover p {
    background-color: #30698b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.linkobrzvon img, .linkzam img {
    vertical-align: middle;
    margin-right: 8px;
}

/* Fix tabs overflow issue - add proper clearfix */
.container-fluid.mainphead .clearfix {
    clear: both;
    height: 0;
    overflow: visible;
}

/* Ensure subslider content doesn't overlap - reserve space for absolute positioned content */
.subslider {
    position: relative;
    z-index: 1;
    min-height: 500px; /* Match the height of tab content */
}

/* Ensure tabs container is within content width */
.container-fluid.mainphead > .container {
    position: relative;
    z-index: 10;
}

/* Fix header logo visibility */
.headlogo {
    float: left;
}

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

/* Modern menu styling with glassmorphism and animations */
.headnavigmenu {
    flex-grow: 0;
}

.headnavigmenu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.headnavigmenu .nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
}

.headnavigmenu .nav li {
    position: relative;
}

.headnavigmenu .nav > li > a {
    display: block;
    padding: 10px 10px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-radius: 5px;
    white-space: nowrap;
    position: relative;
}

/* Glassmorphism effect on hover */
.headnavigmenu .nav > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.headnavigmenu .nav > li > a:hover::before {
    opacity: 1;
}

.headnavigmenu .nav > li > a:hover {
    color: #70bce9;
    transform: translateY(-2px);
}

.headnavigmenu .nav > li.current-menu-item > a {
    color: #70bce9;
}

.headnavigmenu .nav > li.current-menu-item > a::before {
    opacity: 1;
}

/* Modern submenu with glassmorphism and animations */
.headnavigmenu .nav .sub-menu {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: transparent !important;
    min-width: 250px;
    z-index: 1000;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    border-radius: 0 !important;
    opacity: 0;
    pointer-events: none;
    perspective: 1000px;
}

.headnavigmenu .nav li:hover > .sub-menu {
    display: block !important;
    opacity: 1;
    pointer-events: auto;
}

.headnavigmenu .nav .sub-menu li,
.headnavigmenu .nav .sub-menu li.menu-item,
.headnavigmenu .nav .sub-menu li.menu-item-type-post_type,
.headnavigmenu .nav .sub-menu li.menu-item-object-post,
.headnavigmenu .nav ul.sub-menu li,
.headnavigmenu ul.nav ul.sub-menu li {
    display: block !important;
    opacity: 0;
    background: rgb(0 0 0 / 50%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px !important;
    margin: 4px 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.headnavigmenu .nav .sub-menu li a,
.headnavigmenu .nav .sub-menu li.menu-item a,
.headnavigmenu .nav ul.sub-menu li a {
    padding: 12px 20px !important;
    display: block !important;
    white-space: nowrap;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

.headnavigmenu .nav .sub-menu li a:hover {
    color: #70bce9 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 10px rgba(112, 188, 233, 0.5) !important;
}


/* Animated submenu items - rotate and fade in */
.headnavigmenu .nav li:hover > .sub-menu li:nth-child(1) {
    animation: menuItemAppear 0.3s ease-in-out forwards;
    animation-delay: 0s;
}

.headnavigmenu .nav li:hover > .sub-menu li:nth-child(2) {
    animation: menuItemAppear 0.3s ease-in-out forwards;
    animation-delay: 0.05s;
}

.headnavigmenu .nav li:hover > .sub-menu li:nth-child(3) {
    animation: menuItemAppear 0.3s ease-in-out forwards;
    animation-delay: 0.1s;
}

.headnavigmenu .nav li:hover > .sub-menu li:nth-child(4) {
    animation: menuItemAppear 0.3s ease-in-out forwards;
    animation-delay: 0.15s;
}

.headnavigmenu .nav li:hover > .sub-menu li:nth-child(5) {
    animation: menuItemAppear 0.3s ease-in-out forwards;
    animation-delay: 0.2s;
}

.headnavigmenu .nav li:hover > .sub-menu li:nth-child(n+6) {
    animation: menuItemAppear 0.3s ease-in-out forwards;
    animation-delay: 0.25s;
}

@keyframes menuItemAppear {
    0% {
        opacity: 0;
        transform: rotateX(-90deg) translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: rotateX(0) translateY(0);
    }
}

.headnavigmenu .nav .sub-menu a {
    padding: 12px 20px !important;
    display: block;
    white-space: nowrap;
    color: #333 !important;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
}

/* Glass effect on submenu items */
.headnavigmenu .nav .sub-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #1684c6, #70bce9);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.headnavigmenu .nav .sub-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(112, 188, 233, 0.1), transparent);
    transition: width 0.3s ease;
    z-index: -1;
}

.headnavigmenu .nav .sub-menu a:hover {
    color: #1684c6 !important;
    padding-left: 24px !important;
    background: rgba(112, 188, 233, 0.05) !important;
    text-decoration: none !important;
}

.headnavigmenu .nav .sub-menu a:hover::before {
    opacity: 1;
}

.headnavigmenu .nav .sub-menu a:hover::after {
    width: 100%;
}

/* Arrow indicator for menu items with submenu */
.headnavigmenu .nav > li.menu-item-has-children > a::after {
    content: "▾";
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.headnavigmenu .nav > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Fix main content spacing after banner */
main.container {
    margin-top: 100px;
    clear: both;
}

/* Override wrapprivet margin */
.container-fluid.wrapprivet,
.container-fluid.wrapprivet.wrapperpadd {
    margin-top: 80px !important;
}

/* Style wrapprivet text block */
.container-fluid.wrapprivet .privtxt {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 500px;
}

.container-fluid.wrapprivet .privtxt p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Hide "Подробнее" link */
.container-fluid.wrapprivet .privtxt a,
.container-fluid.wrapprivet .privtxt a[href*="podrobnee"],
.container-fluid.wrapprivet a:contains("ПОДРОБНЕЕ"),
.container-fluid.wrapprivet p:has(a[href*="podrobnee"]) {
    display: none !important;
}

/* Style utpprefoot blocks - center image and text */
.utpprefoot {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
}

.utpprefoot img {
    display: block;
    margin: 0 auto 15px auto;
    width: auto;
    height: 80px;
    object-fit: contain;
}

.utpprefoot p {
    margin: 0;
    text-align: center;
    min-height: 60px;
}

/* Fix sub-tabs to fit in one row */
.subslidertabs>li {
    width: auto !important;
    flex: 1 !important;
    max-width: 19% !important;
}

.subslidertabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 3px !important;
}

/* Fix vertical alignment of text and icons in sub-tabs */
.subslidertabs > li a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100%;
    padding: 10px 5px !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

.subslidertabs > li img {
    display: block !important;
    margin: 0 auto 5px auto !important;
    vertical-align: middle !important;
}

/* Remove any extra spacing from text */
.subslidertabs > li a,
.subslidertabs > li.firstbut a,
.subslidertabs > li.secbut a,
.subslidertabs > li.thbut a,
.subslidertabs > li.fobut a,
.subslidertabs > li.fibut a {
    font-size: 12px !important;
    line-height: 1.2 !important;
}

/* Ensure proper spacing for all tab states */
.subslidertabs > li.active a,
.subslidertabs > li a:hover,
.subslidertabs > li a:focus {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Modern Swiper carousel styles */
.wrapcar {
    position: relative;
    padding: 40px 0;
}

.newfuckarousel.swiper {
    overflow: hidden;
    border-radius: 12px;
    padding: 20px 0;
    margin: 0 80px;
}

.swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.slideofcar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Minimalist arrow buttons - positioned outside */
.swiper-button-prev,
.swiper-button-next {
    background: transparent;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    transition: all 0.3s ease;
    box-shadow: none;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    color: #999;
    font-size: 24px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.swiper-button-prev {
    left: -70px;
}

.swiper-button-next {
    right: -70px;
}

/* Custom arrow icons */
.swiper-button-prev::after {
    content: '←';
}

.swiper-button-next::after {
    content: '→';
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background: #1684c6;
    border: 2px solid #1684c6;
    transform: scale(1.1);
}

.swiper-button-prev:hover::after,
.swiper-button-next:hover::after {
    color: #fff;
}

.swiper-button-prev:active,
.swiper-button-next:active {
    transform: scale(1.05);
}

.swiper-button-prev.swiper-button-disabled,
.swiper-button-next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.swiper-pagination {
    bottom: 0 !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #1684c6;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    width: 30px;
    border-radius: 6px;
}

/* Ensure carousel items look good */
.slideofcar img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Partners logo carousel */
.centercarosel.slider.swiper {
    padding: 40px 0;
    overflow: hidden;
}

.centercarosel.slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
}

.centercarosel.slider .swiper-slide img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.centercarosel.slider .swiper-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}
