/* Styles for template-home-new.php */


/* Hero Section Container */
.home-hero-section {
    position: relative;
    padding-top: 48px;
    padding-bottom: 48px;
    overflow-x: clip;
    /* allows elements to stick out slightly but prevents horizontal scroll */
}

.home-container {
    padding: 0 3em;
    max-width: none;
    margin: 0 auto;
    position: relative;
}

/* Base Grid */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: center;
}

/* Left Column */
.hero-col-left {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

.hero-deco-line-left {
    position: absolute;
    top: -140px;
    left: -55px;
    z-index: -1;
}

.hero-text-block {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

h1.hero-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 52px;
    line-height: 108%;
    color: #090909;
    font-weight: 900;
    margin: 0;
}

.hero-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    line-height: 1.5;
    font-weight: 500;
    color: #090909;
    margin: 0;
}

.hero-btn-wrap {
    display: flex;
}

a.hero-btn {
    display: inline-block;
    background-color: #FF9F00;
    padding: 20px 30px;
    border-radius: 100px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
}

a.hero-btn:hover {
    background-color: #e68e00;
    transform: translateY(-2px);
}

/* Right Column */
.hero-col-right {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 15px;
    align-items: stretch;
}

.hero-img-wrap {
    display: flex;
}

.hero-main-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Stats */
.hero-stats-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.hero-stat {
    background-color: #FFEED6;
    padding: 20px 16px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.hero-stat-val {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 52px;
    font-weight: 600;
    color: #090909;
    margin: 0;
    line-height: 1;
}

.hero-stat-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #090909;
    margin: 0;
    line-height: 1.3;
}

/* Right Side Decorations */
.hero-deco-flag {
    position: absolute;
    top: -20px;
    right: -15px;
    width: 54px;
    height: 54px;
    z-index: 5;
}

.hero-deco-line-stat-2 {
    display: none;
}

.hero-deco-line-stat-3 {
    position: absolute;
    top: -30px;
    left: 77%;
    z-index: -1;
}

/* Tablet & Mobile Layout */
@media (max-width: 1024px) {
    .home-container {
        padding: 0 3em;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-deco-line-left {
        left: -50px;
        width: auto;
        top: -110px;
        z-index: 999999999;
    }

    h1.hero-title {
        text-align: center;
    }

    .hero-desc {
        text-align: center;
    }

    .hero-btn-wrap {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .home-hero-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .home-container {
        padding: 0 10px;
    }

    .hero-deco-line-left {
        left: -28px;
        width: auto;
        top: -95px;
        z-index: 999999999;
    }

    .hero-col-right {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-text-block {
        gap: 20px;
    }

    h1.hero-title {
        font-size: 32px;
        text-align: center;

    }

    .hero-desc {
        font-size: 16px;
        text-align: center;
    }

    .hero-btn-wrap {
        justify-content: center;
    }

    a.hero-btn {
        font-size: 14px;
    }

    .hero-col-left {
        gap: 28px;
    }

    .hero-stats-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .hero-stat {
        gap: 12px;
        padding: 12px;
    }

    /* Reorder stats for mobile strictly matching screenshot */
    .hero-stat:nth-child(1) {
        order: 1;
    }

    .hero-stat:nth-child(2) {
        order: 3;
        grid-column: 1 / -1;
    }

    .hero-stat:nth-child(3) {
        order: 2;
    }

    .hero-stat-label {
        font-size: 13px;
    }

    /* Toggle Decoration paths for mobile logic */
    .hero-deco-line-stat-3 {
        display: none;
    }

    .hero-deco-line-stat-2 {
        display: block;
        position: absolute;
        top: -15px;
        left: 80%;
        z-index: -1;
    }
}

/* --- Section 2: Tabs Container --- */
.home-section-tabs {
    padding: 80px 0;
}

.section-2-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 48px;
    font-weight: 600;
    color: #090909;
    text-align: center;
    margin-bottom: 40px;
}

.home-tabs-wrapper {
    display: flex;
    flex-direction: column;
}

.tabs-header {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    /* in case there are many tabs */
}

.tab-btn {
    background: #F7F6F4;
    color: #807f7e;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 24px;
    /* adjusted slightly for breathing room */
    border-radius: 20px 20px 0 0;
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.tab-btn:focus {
    outline: none;
}

.tab-btn.is-active,
.tab-btn:hover {
    background: #FFEED6;
    color: #E93D28;
    border-bottom: 2px solid #E93D28;
}


.tabs-content-area {
    background: #FFEED6;
    border-radius: 0 28px 28px 28px;
    padding: 68px 44px 72px 44px;
    position: relative;
}

.tab-content {
    display: none;
    position: relative;
    flex-direction: column;
    gap: 32px;
}

.tab-content.is-active {
    display: flex;
    animation: fadeInTab 0.4s ease;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-inner-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #090909;
    margin: 0;

    text-align: center;
}

/* Carousel Styles */
.tab-carousel {
    margin-bottom: 0;
}

.carousel-item {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 34px;
    width: calc(33.333% - 14px);
    /* 3 items with 20px gap */
    margin-right: 20px;
    min-height: 240px;
}

.item-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.item-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.item-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #090909;
    margin: 0;
}

.item-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    /* User requested 18px but changed to 16px if needed, actually let me set 18px requested */
    font-weight: 500;
    line-height: 144%;
    color: #090909;
    margin: 0;
}

/* Decorative Object */
.tab-deco-icon {
    position: absolute;
    bottom: -55px;
    /* pull down a bit */
    right: 0px;
    max-width: 170px;
    height: auto;
    object-fit: contain;
    z-index: 5;
    pointer-events: none;
}

/* Flickity Buttons */
.home-section-tabs .flickity-button {
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 0;
    padding: 0;
}

.home-section-tabs .flickity-button:hover {
    background: transparent;
    opacity: 0.7;
}

.home-section-tabs .flickity-button-icon {
    display: none;
}

.home-section-tabs .flickity-prev-next-button.previous {
    left: -40px;
    background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-prev.svg') center/contain no-repeat;
}

.home-section-tabs .flickity-prev-next-button.next {
    right: -40px;
    background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-next.svg') center/contain no-repeat;
}

.home-section-tabs .flickity-prev-next-button:focus {
    box-shadow: none;
    border: none;
}

.home-section-tabs .flickity-page-dots {
    display: none;
    /* User didn't request dots */
}

/* Responsive */
@media (max-width: 1024px) {
    .carousel-item {
        width: calc(50% - 10px);
    }

    .section-2-title {
        font-size: 40px;
    }
}

@media (max-width: 767px) {
    .home-section-tabs {
        padding: 40px 0;
    }

    .section-2-title {
        font-size: 32px;
        margin-bottom: 24px;
    }

    .tabs-header {
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 14px;
        flex: 1;
        text-align: center;
        white-space: normal;
    }

    .tab-inner-title {
        font-size: 24px;
        line-height: 108%;
    }

    .tabs-content-area {
        border-radius: 0 0 20px 20px;
        padding: 30px 15px 100px 15px;
    }

    .carousel-item {
        width: 100%;
        /* Peek next item */
        min-height: auto;
        gap: 28px;
    }

    .item-title {
        font-size: 18px;
    }

    .home-section-tabs .flickity-prev-next-button {
        display: block;
        top: auto;
        bottom: -65px;
        transform: translateY(0);
    }

    .home-section-tabs .flickity-prev-next-button.previous {
        left: calc(50% - 50px);
    }

    .home-section-tabs .flickity-prev-next-button.next {
        right: auto;
        left: calc(50% + 10px);
    }

    .tab-deco-icon {
        max-width: 120px;
        right: -10px;
        bottom: -20px;
    }
}

/* --- Section 3 --- */
.home-section-3 {
    padding: 80px 0;
    overflow: hidden;
    /* to prevent the absolute yellow decoration from breaking horizontal scroll */
}

h2.sec3-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 48px;
    font-weight: 600;
    color: #090909;
    line-height: 108%;
    text-align: center;
    margin: 0;
}

h2 span {
    color: #E93D28;
}

.sec3-row-2 {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.sec3-feature-box {
    background: #F7F6F4;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    /* evenly divide normally, but first child gets more */
}

.sec3-feature-box:nth-child(1) {
    background: #E93D28;
    flex: 1.6;
    /* Give it more width as per screenshot */
}

.sec3-feature-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.sec3-feature-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 144%;
    font-weight: 500;
    color: #090909;
    margin: 0;
}

.sec3-feature-box:nth-child(1) .sec3-feature-text {
    color: #FFFFFF;
}

.sec3-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 45px;
    position: relative;
}

.sec3-r3-img {
    width: 100%;
    height: auto;
    border-radius: 17px;
    object-fit: cover;
}

.sec3-r3-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    position: relative;
}

h3.sec3-r3-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #090909;
    line-height: 128%;
    margin: 0;
}

.sec3-r3-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 144%;
    color: #090909;
    margin: 0;
}

.sec3-deco {
    position: absolute;
    bottom: -150px;
    right: -70px;
    max-width: 150px;
    height: auto;
    z-index: -1;
}

@media (max-width: 1024px) {
    .sec3-row-2 {
        flex-wrap: wrap;
    }

    .sec3-feature-box {
        flex-basis: calc(50% - 10px);
        min-width: calc(50% - 10px);
    }

    .sec3-feature-box:nth-child(1) {
        flex-basis: 100%;
        /* Wide on tablet */
        min-width: 100%;
    }

    .sec3-deco {
        display: none;
    }

    .sec3-row-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .home-section-3 {
        padding: 40px 0;
    }

    h2.sec3-title {
        font-size: 26px;
    }

    h2.sec3-title br {
        display: none;
    }

    .sec3-row-2 {
        flex-direction: column;
        gap: 15px;
    }

    .sec3-feature-box {
        flex-basis: auto;
        min-width: auto;
        width: 100%;
    }

    .sec3-row-3 {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sec3-r3-img {
        max-height: 210px;
        object-position: top;
    }

    h3.sec3-r3-title {
        font-size: 22px;
    }

    .sec3-r3-text {
        font-size: 16px;
    }

    .sec3-deco {
        display: block;
        bottom: -180px;
        right: -27px;
        max-width: 100px;
    }

    .sec3-r3-content {
        gap: 16px;
    }
}

/* --- Section 4: Form Banner --- */
.home-section-4 {
    padding: 40px 0 80px 0;
    overflow-x: clip;
}

.sec4-inner {
    background: #E93C26;
    border-radius: 28px;
    padding: 60px 50px 0 50px;
    display: flex;
    gap: 48px;
    position: relative;
}

.sec4-col-left {
    flex: 1;
    padding-bottom: 60px;
    /* Compensate for no bottom padding on container */
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 2;
    justify-content: center;
}

h3.sec4-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 40px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 115%;
    margin: 0;
}

.sec4-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #FFFFFF;
    line-height: 140%;
    margin: 0;
}

.sec4-col-right {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    position: relative;
}

.sec4-img {
    max-width: 100%;
    height: 540px;
    object-fit: contain;
    object-position: bottom;
    display: block;
    margin-right: -10px;
}

.sec4-deco-lines {
    position: absolute;
    bottom: -30px;
    left: -80px;
    max-width: 180px;
    height: auto;
    z-index: 5;
}

body .sec4-form-wrapper input,
body .sec4-form-wrapper select {
    background: #FFFFFF;
}

body .sec4-form-wrapper input[type="submit"] {
    background: #FF9F00;
}

.sec4-form-wrapper .wpcf7-not-valid-tip {
    color: #fff;
}

.sec4-form-wrapper .wpcf7 form .wpcf7-response-output {
    color: #fff;
}

@media (max-width: 1024px) {
    .sec4-inner {
        flex-direction: column;
        gap: 0;
    }

    .sec4-col-left {
        padding-bottom: 40px;
    }

    .sec4-col-right {
        display: none;
    }

    .sec4-deco-lines {
        left: -40px;
        max-width: 140px;
    }

    body .sec4-form-wrapper input,
    body .sec4-form-wrapper select {
        max-width: unset;
        width: 100%;
    }

    body .sec4-form-wrapper input[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .home-section-4 {
        padding: 40px 0;
    }

    .sec4-inner {
        padding: 40px 44px 0 44px;
    }

    h3.sec4-title {
        font-size: 26px;
        text-align: center;
    }

    .sec4-text {
        font-size: 16px;
        text-align: center;
    }

    .sec4-deco-lines {
        left: -20px;
        bottom: -20px;
        max-width: 100px;
    }

    .sec4-img {
        margin-right: 0;
    }
}

/* --- Section 5: Services --- */
.home-section-5 {
    padding: 80px 0;
}

h2.sec5-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 48px;
    font-weight: 600;
    color: #090909;
    line-height: 108%;
    text-align: center;
    margin: 0 0 40px 0;
}

.sec5-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sec5-item {
    background: #FFFFFF;
    border-radius: 18px;
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.12);
    /* #0000001F */
    overflow: hidden;
    display: flex;
}

/* Normal item */
.sec5-item.is-normal {
    flex-basis: calc(33.333% - 14px);
    /* 3 in a row with 20px gap */
    flex-direction: column;
}

.sec5-item.is-normal .sec5-img-col {
    width: 100%;
}

.sec5-item.is-normal .sec5-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    object-position: top;
    display: block;
}

.sec5-item.is-normal .sec5-content-col {
    padding: 20px 24px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    /* stretches to fill remaining height if aligned */
}

/* Full width item */
.sec5-item.is-full {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: 40% calc(60% - 32px);
    gap: 32px;
    align-items: center;
    /* вертикальне центрування */
}

.sec5-item.is-full .sec5-img-col {
    width: 100%;
    height: 100%;
}

.sec5-item.is-full .sec5-img {
    width: 100%;
    height: 100%;
    max-height: 370px;
    object-fit: cover;
    object-position: top;
    display: block;
}

.sec5-item.is-full .sec5-content-col {
    padding-right: 25px;
    /* rights side padding */
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Content styles */
.sec5-text-grp {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

h3.sec5-item-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-weight: 600;
    color: #090909;
    line-height: 108%;
    margin: 0;
}

.sec5-item.is-full h3.sec5-item-title {
    font-size: 32px;
}

.sec5-item.is-normal h3.sec5-item-title {
    font-size: 24px;
}

.sec5-item-desc {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: #090909;
    line-height: 144%;
    margin: 0;
}

.sec5-item.is-full .sec5-item-desc {
    font-size: 18px;
}

.sec5-item.is-normal .sec5-item-desc {
    font-size: 16px;
}

.sec5-btns-grp {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: auto;
    /* Push to bottom on cards */
}

a.sec5-btn {
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 100%;
    text-decoration: none;
    border-radius: 100px;
    padding: 20px 30px;
    text-align: center;
    transition: transform 0.2s, opacity 0.2s;

    text-transform: uppercase;
}

a.sec5-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Tablet 1024px */
@media (max-width: 1024px) {
    .sec5-item.is-normal {
        flex-basis: calc(50% - 10px);
    }

    .sec5-item.is-full {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: stretch;
        padding-bottom: 24px;
        /* Space inside since image is top */
    }

    .sec5-item.is-full .sec5-img-col {
        max-height: 370px;
        /* Let it scale */
    }

    .sec5-item.is-full .sec5-content-col {
        padding: 0 24px;
    }
}

/* Mobile 767px */
@media (max-width: 767px) {
    .home-section-5 {
        padding: 40px 0;
        padding-bottom: 100px;
        overflow: hidden;
        /* For flickity arrows */
    }

    h2.sec5-title {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .sec5-grid {
        display: block;
        /* Important: initialize flickity as block */
    }

    .sec5-item {
        width: 100%;
        margin-bottom: 0;
    }

    .sec5-item.is-normal,
    .sec5-item.is-full {
        flex-basis: 100%;
        flex-direction: column;
        display: flex;
        margin-right: 20px;
        /* Gap in flickity */
        width: calc(100% - 10px);
        /* Leave small gap for peek */
    }

    .sec5-item.is-full {
        display: flex;
        padding-bottom: 0;
    }

    .sec5-item.is-full .sec5-img-col,
    .sec5-item.is-normal .sec5-img-col {
        width: 100%;
        max-height: 280px;
        object-position: top;
    }

    .sec5-item.is-full .sec5-content-col,
    .sec5-item.is-normal .sec5-content-col {
        padding: 20px 20px 24px 20px;
        gap: 20px;
    }

    h3.sec5-item-title {
        font-size: 20px !important;
    }

    .sec5-item-desc {
        font-size: 16px !important;
    }

    .sec5-btns-grp {
        flex-direction: column;
    }

    a.sec5-btn {
        width: 100%;
        font-size: 14px;
    }

    /* Mobile carousel arrows below */
    .home-section-5 .flickity-prev-next-button {
        display: block;
        top: auto;
        bottom: -65px;
        transform: translateY(0);
    }

    .home-section-5 .flickity-prev-next-button.previous {
        left: calc(50% - 50px);
    }

    .home-section-5 .flickity-prev-next-button.next {
        right: auto;
        left: calc(50% + 10px);
    }

    /* Use custom arrows */
    .home-section-5 .flickity-prev-next-button svg {
        display: none;
    }

    .home-section-5 .flickity-prev-next-button {
        width: 40px;
        height: 40px;
        background: transparent;
    }

    .home-section-5 .flickity-prev-next-button.previous {
        background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-prev.svg') center/contain no-repeat;
    }

    .home-section-5 .flickity-prev-next-button.next {
        background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-next.svg') center/contain no-repeat;
    }

    .home-section-5 .flickity-page-dots {
        display: none;
    }
}

/* --- Section 7: Loyalty --- */
.home-section-7 {
    padding: 80px 0 100px 0;
    position: relative;
    overflow: hidden;
    /* Prevent horizontal scroll for flickity/decorations across all screens */
}

.sec7-top-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.sec7-pretitle-wrapper {
    position: relative;
    display: inline-block;
}

.sec7-pretitle {
    background: #E93C26;
    color: #FFFFFF;
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 8px;
    margin: 0;
    max-width: 250px;
    text-align: center;
}

.sec7-spiral {
    position: absolute;
    bottom: 100%;
    margin-bottom: 5px;
    right: 100%;
    margin-right: -25px;
    max-width: 80px;
    z-index: 5;
}

h2.sec7-title {
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 48px;
    font-weight: 600;
    color: #090909;
    line-height: 108%;
    margin: 0;
    text-align: center;
}

.sec7-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #090909;
    line-height: 144%;
    margin: 0;
    text-align: center;
}

.sec7-grid {
    display: block;
    padding: 0 40px;
}

.sec7-item {
    background: #FFEED6;
    border-radius: 20px;
    padding: 20px;
    width: calc(33.3333% - 14px);
    margin-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* push bottom elements */
}

.sec7-item-top {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.sec7-item-head {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sec7-item-icon {
    width: 100px;
    height: 80px;
    object-fit: contain;
}

.sec7-item-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #090909;
    line-height: 100%;
    margin: 0;
}

.sec7-item-excerpt {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #090909;
    line-height: 144%;
    margin: 0;
}

.sec7-item-bottom {
    padding-top: 16px;
    border-top: 1px solid rgba(9, 9, 9, 0.1);
}

.sec7-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'MuseoSansCyrl', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #090909;
    line-height: 100%;
}

.sec7-toggle-icon {
    width: 16px;
    height: 16px;
    background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-down.svg') center/contain no-repeat;
    transition: transform 0.3s;
}

.sec7-toggle.is-open .sec7-toggle-icon {
    transform: rotate(180deg);
}

.sec7-item-content {
    display: none;
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #090909;
    line-height: 144%;
}

.sec7-item-content ul {
    padding-left: 20px;
    margin: 0;
}

.sec7-item-content li {
    margin-bottom: 8px;
}

.sec7-item-content *:last-child {
    margin-bottom: 0;
}

.home-section-7 .flickity-prev-next-button svg {
    display: none;
}

.home-section-7 .flickity-prev-next-button {
    width: 40px;
    height: 40px;
    background: transparent;
}

.home-section-7 .flickity-prev-next-button.previous {
    background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-prev.svg') center/contain no-repeat;
    left: -15px;
    /* Adjust to edge */
}

.home-section-7 .flickity-prev-next-button.next {
    background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-next.svg') center/contain no-repeat;
    right: -15px;
    /* Adjust to edge */
}

.home-section-7 .flickity-page-dots {
    display: none;
}

.sec7-deco-right {
    position: absolute;
    bottom: -100px;
    right: 20px;
    max-width: 80px;
    z-index: 5;
}

.flickity-prev-next-button:focus,
.flickity-prev-next-button:hover {
    border: unset;
    box-shadow: unset;
}

@media (max-width: 1024px) {
    .sec7-item {
        width: calc(50% - 10px);
    }

    .sec7-deco-right {
        bottom: auto;
        top: 220px;
        /* Adjust according to "на мобайлі і планшеті, вона переміщається наверх" */
    }

    .home-section-7 .flickity-prev-next-button {
        top: auto;
        bottom: -65px;
        transform: translateY(0);
    }

    .home-section-7 .flickity-prev-next-button.previous {
        left: calc(50% - 50px);
    }

    .home-section-7 .flickity-prev-next-button.next {
        right: auto;
        left: calc(50% + 10px);
    }
}

@media (max-width: 767px) {
    .home-section-7 {
        padding: 80px 0 120px 0;
        overflow: hidden;
        /* Prevent horizontal scroll for flickity/decorations */
    }

    h2.sec7-title {
        font-size: 26px;
    }

    .sec7-item {
        width: calc(100% - 10px);
    }

    .home-section-7 .flickity-prev-next-button.next {
        background: url('https://dyvys.org/wp-content/uploads/2026/04/arr-next.svg') center/contain no-repeat;
    }

    .home-section-7 .flickity-page-dots {
        display: none;
    }

    .sec7-pretitle {
        font-size: 12px;
    }

    .sec7-grid {
        padding: 0 10px;
    }

    .wpcf7 form .wpcf7-response-output {
        margin-top: 0;
    }
}