.gallery-active p {
    background-color: #f02520;
    color: #f5f5f5;
    text-transform: uppercase;
    font-weight: normal;
    border: 1px solid #3e3e3e;
    letter-spacing: 1px;
    padding: 15px 50px;
    font-size: 15px;
    word-break: normal;
    /*width: 100%;*/
    word-wrap: break-word; display:table-cell
}.gallery-tab-section p {
    padding: 15px 0px;
    color: #ccc;
    text-transform: uppercase;
    border: 1px solid #3e3e3e;
    letter-spacing: 1px;
    font-size: 15px;
    font-weight: normal;
}.gallery-tab-section p:hover {
    background: #6f6f6f;
    color: #ccc;
}
.gallery-grid-sec .grid_section .vc_col-sm-3:nth-child(1) .wpb_content_element{
     margin: 0px auto;
    display: block;
    width: 100%;
} 

.gallery-grid-sec .grid_section .vc_col-sm-3:nth-child(1) .wpb_content_element p{
        display: block;
    
    width: auto;
    border: 0px;
}
.gallery-active a {
    color: #fff !important;
}
.gallery-tab-section p a{padding: 0px 50px;text-align: center;
  word-break: normal;word-wrap: break-word;width: auto;display: block;color:#fff !important}
.sub-boxes .q_tabs .tabs-nav li.active a {
    background: none;
    border: 0px;
    border-bottom: 1px solid #f02520;
    font-size: 14px;
    letter-spacing: 0px;
    color: #ccc;
    font-weight: normal;
}

.sub-boxes .q_tabs .tabs-nav li a {
    background: none;
    border: 0px;
    border-bottom: 1px solid #3e3e3e;
    font-size: 14px;
    height: 44px;
    font-weight: normal;
    letter-spacing: 0px;
}

.sub-boxes .q_tabs .tabs-nav li {
    margin: 0px 10px;
    padding: 0px;
}

@media(max-width:991px){.gallery-grid-sec .wpb_content_element p, .gallery-grid-sec .wpb_content_element a {
    padding: 1px 0px;
    font-size: 12px;
    display: block;
}
 .gallery-active p{width: auto; word-wrap: normal; display: block;} 

.gallery-grid-sec .vc_col-sm-3 {
    width: 50%;
    float: left;
    display: inline-block;
}

.gallery-grid-sec .vc_column-inner {
    padding: 5px;
}}
.sub-boxes ul.tabs-nav li a {
    font-size: 15px !important;
    padding: 0px 5px;
}
@media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (-webkit-min-device-pixel-ratio: 1){.gallery-tab-section p a{padding: 0px;} .gallery-active p{    padding: 15px 15px;} }
@media(max-width:420px){.gallery_holder.with_space ul {
    width: calc(100% + 30px);
    margin: 0px -32px;
}}
@media(max-width:1024px){.gallery-tab-section p a{display:contents}}

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
  .gallery-tab-section p a{display: block;width: auto;}    

}

a, p a {
    color: #505050;
}