/*
 Theme Name:   Enfold Child
 Theme URI:    https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990
 Description:  Child theme for the Enfold WordPress theme
 Author:       Janne Lahtela / Devaajanne Ltd
 Author URI:   https://devaajanne.fi/
 Template:     enfold
 Version:      1.0.0
*/

@import url("../enfold/style.css");

body {
    background-color: #b4dcdd;
}

#header_main {
    border-bottom-style: solid;
    z-index: 1
}

#header_meta {
    border: none;
}

#header_meta .container {
    min-height: 0px;
}

#header_main {
    border: none;
}

.html_header_top.html_header_topbar_active.html_header_sticky #top #main {
    padding-top: 0;
}

/*
@media (menuitem-width: 782px) { 
    .html_header_top.html_header_sticky #top #wrap_all #main {
        padding-top: 100px !important;
    }
}
*/
.avia-search-tooltip {
    background-color: #fff !important;
}

/* Projects Page Banner Styles - Simplified */
.projects-banner-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    overflow: visible !important;
}

.projects-banner-image {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    line-height: 0 !important;
}

.projects-banner-img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.projects-banner-bar {
    width: 100% !important;
    height: 40px !important;
    background-color: #b02b2c !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    clear: both !important;
}

/* Safari specific grid fixes */
@supports (-webkit-appearance: none) and (not (-moz-appearance: none)) {
    .projects-grid {
        display: -webkit-grid;
        display: grid;
        -webkit-grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Firefox specific grid fixes */
@-moz-document url-prefix() {
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        width: 100%;
    }
    
    .project-grid-item {
        width: auto;
        min-width: 0;
    }
}

/* Responsive adjustments - simplified */
@media (max-width: 768px) {
    .projects-banner-img {
        width: 100%;
        height: auto;
    }
}

/*
 .responsive.html_mobile_menu_tablet #top #wrap_all #header { 
    position: fixed;
 }
*/
.av-small-burger-icon {
    background: #fff;
    padding: 5px;
    width: 100px;
    text-align: center;
    border-radius: 50px;
}

.avia-section {
    clear: both;
    width: 100%;
    float: left;
    min-height: 10px;
    position: static
}

.avia-related-tooltip.avia-tt {
    display: none !important;
}

#top #wrap_all .all_colors h3 {
    font-weight: 500;
}

#top #wrap_all .header_color.av_header_transparency .avia-svg-icon svg:first-child,
.header_color .main_menu ul:first-child>#menu-item-search>a svg:first-child {
    top: 0.4em;
    stroke: #000;
    fill: #000;
    color: #000;
    z-index: 10;
}

.sub_menu {
    top: 3.5em;
    left: 7em;
    font-size: 16px;
    text-transform: uppercase;
}

.sub_menu>.menu>.menu-item>a {
    color: #000 !important;
    font-family: 'magenos';
    font-weight: 800;
    font-size: 20px;
}

.sub_menu>.menu>.menu-item>a::before,
.sub_menu>.menu>.menu-item>a::after {
    /*content: "⋮";
  color: #000;
  margin: 0 0.5em;*/
}

#top .av_header_transparency #header_meta {
    border: none;
}

#header_meta {
    min-height: 0px;
}

.header-scrolled>#header_meta>.container>.sub_menu {
    top: 4em !important;
    font-size: 12px;
}

#top .av-masonry-entry-title {
    text-align: left;
}

#top .av-masonry-entry.isotope-item figcaption {
    height: 135px;
}

.av-masonry-sort>.av-sort-by-term>a {
    font-size: 20px;
    font-family: 'magenos';
}

.custom-accordion>.av_toggle_section>.single_toggle>.toggler {
    background: #b02b2c;
    color: #000 !important;
}

.custom-accordion>.av_toggle_section>.single_toggle>.toggle_wrap>.toggle_content {
    color: #000 !important;
}

#scrolled-header {
    background: #b3d9d0;
}

@media (max-width: 769px) {

    .responsive #header .sub_menu,
    .responsive #header_meta .sub_menu>ul {
        top: 1.5em;
        position: relative;
        left: -1em;
        width: 200px;
    }
}

.av-privacy-popup-button-wrap {
    display: inline-block;
}

.av-privacy-popup-button-wrap>a.avia-button {
    background: transparent;
    text-transform: none !important;
    font-family: 'magenos';
    font-size: 18px;
    text-align: center;
    padding: 0px;
}

.carousel-tag>.depicter-tag-item>a {
    color: #fff;
}

.wpcf7-response-output {
    border-color: none !important;
}

#top #main .av-masonry-entry .av-masonry-entry-title.entry-title {
    font-weight: 500;
}

#top .header_color.av_header_transparency .avia-menu-fx,
.av_header_transparency div .av-hamburger-inner,
.av_header_transparency div .av-hamburger-inner::before,
.av_header_transparency div .av-hamburger-inner::after,
.av-burger-overlay-active #top .av-hamburger-inner {
    background: #000 !important;
}

.wpcf7-form>p {
    text-align: center;
}

.av-post-metadata-meta-content {
    font-size: 18px;
}

/* Project Single Page Styles */
.template-projects .post-entry-type-projects {
    margin-top: 5em;
}

/* Hide footer content for project pages */
.template-projects footer.footer-page-content {
    display: none;
}

.template-projects .page-thumb {
    margin: 20px 0 30px 0;
    text-align: center;
}

.template-projects .page-thumb img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.template-projects .project-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.template-projects .project-featured-badge {
    display: inline-block;
    background: #b02b2c;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-weight: 500;
}

.template-projects .project-meta {
    margin: 30px 0;
    padding: 20px;
    background: #f8f8f8;
    border-left: 4px solid #b02b2c;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    font-size: 16px !important;
    font-family: 'magenos';
    ;
}

.template-projects .project-meta>div {
    margin-bottom: 10px;
    line-height: 1.6;
}

.template-projects .project-meta>div:last-child {
    margin-bottom: 0;
}

.template-projects .post-title.entry-title {
    text-align: center;
    margin-bottom: 10px;
}

.template-projects .post-meta-infos {
    text-align: center;
    margin-bottom: 30px;
}

.template-projects .post-meta-infos .blog-categories.minor-meta {
    font-size: 0.9em;
    color: #666;
}

.template-projects .post-meta-infos .blog-categories.minor-meta a {
    color: #b02b2c;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
}

.template-projects .post-meta-infos .blog-categories.minor-meta a:hover {
    text-decoration: underline;
}

.template-projects .entry-content-wrapper.entry-content.clearfix {
    margin-top: 5em;
}

.template-projects .entry-content {
    margin-bottom: 20px;
    line-height: 1.7;
    max-width: 40em;
    margin-left: auto;
    margin-right: auto;
    font-size: 18px;
}

.template-projects .project-details-section {
    margin: 30px 0;
}

.template-projects .project-details-section h3 {
    color: #b02b2c;
    border-bottom: 2px solid #b02b2c;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.template-projects .project-technologies {
    margin-bottom: 30px;
}

.template-projects .technologies-content {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    line-height: 1.6;
}

.template-projects .project-url {
    margin-bottom: 30px;
}

.template-projects .project-link-button {
    display: inline-block;
    background: #b02b2c;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-weight: 500;
}

.template-projects .project-link-button:hover {
    background: #8a2225;
    color: #fff;
    text-decoration: none;
}

.template-projects .project-gallery-section {
    margin-bottom: 30px;
}

.template-projects .project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.template-projects .gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.template-projects .gallery-item a:hover img {
    transform: scale(1.05);
}

.template-projects .project-testimonial {
    margin-bottom: 30px;
}

.template-projects .testimonial-content {
    background: #f0f8ff;
    padding: 20px;
    border-left: 4px solid #b02b2c;
    margin: 15px 0;
    font-style: italic;
    line-height: 1.6;
}

.template-projects .testimonial-author {
    display: block;
    text-align: right;
    color: #666;
    font-weight: 500;
    margin-top: 10px;
}

.template-projects .project-categories {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.template-projects .project-categories a {
    color: #b02b2c;
    text-decoration: none;
}

.template-projects .project-categories a:hover {
    text-decoration: underline;
}

/* Project Filters Styles - Tag Cloud */
.project-filters {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 8px;
    margin-top: 5em;
    margin-bottom: 30px;
}

.filter-cloud-section {
    margin-bottom: 20px;
}

.filter-cloud-section:last-child {
    margin-bottom: 0;
}

.filter-cloud-section h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
}

.category-cloud,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.filter-tag {
    display: inline-block;
    padding: 6px 12px;
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'magenos';
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    user-select: none;
}

.filter-tag:hover {
    background: #b02b2c;
    color: #fff;
    border-color: #b02b2c;
    transform: translateY(-1px);
}

.filter-tag.active {
    background: #b02b2c;
    color: #fff;
    border-color: #b02b2c;
    font-weight: 600;
}

.filter-tag small {
    opacity: 0.8;
    font-size: 0.85em;
}

.clear-filters-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.clear-filters-btn {
    padding: 10px 20px;
    background: #666;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.clear-filters-btn:hover {
    background: #b02b2c;
    transform: translateY(-1px);
}

/* Projects Grid Archive Styles */
.projects-grid {
    /* Fallback for browsers without Grid support */
    display: flex;
    flex-wrap: wrap;
    margin: 40px -15px; /* Negative margin to compensate for item padding */
    
    /* Modern Grid implementation */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
    
    /* Safari specific grid fixes */
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

/* Fallback flexbox styling for older browsers */
@supports not (display: grid) {
    .projects-grid {
        display: -webkit-box;
        display: -webkit-flex;
        display: -ms-flexbox;
        display: flex;
        -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        margin: 40px -15px;
    }
    
    .project-grid-item {
        -webkit-box-flex: 0;
        -webkit-flex: 0 0 calc(33.333% - 30px);
        -ms-flex: 0 0 calc(33.333% - 30px);
        flex: 0 0 calc(33.333% - 30px);
        margin: 15px;
    }
}

.project-grid-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Ensure proper sizing in grid */
    min-width: 0; /* Prevent grid blowout */
    width: 100%;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

.project-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.project-grid-item .project-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.project-grid-item .project-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-grid-item .project-thumbnail img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    transition: transform 0.3s ease;
    /* Safari/Firefox fixes */
    display: block;
    max-width: 100%;
}

.project-grid-item:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-grid-item .project-info {
    padding: 20px;
}

.project-grid-item .project-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-family: 'magenos' !important;
    font-weight: 800 !important;
    color: #333;
    line-height: 1.3;
}

.project-grid-item .project-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 18px;
}

.project-grid-item .project-categories {
    margin-top: 10px;
}

.project-grid-item .project-category {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 500;
}

.project-grid-item .project-tags {
    margin-top: 5px;
}

.project-grid-item .project-tag {
    display: inline-block;
    background: #e8f4f8;
    color: #2c5aa0;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    margin-right: 4px;
    margin-bottom: 3px;
    font-weight: 500;
}

.project-grid-item:hover .project-title {
    color: #b02b2c;
}

/* Projects Pagination Styles */
.projects-pagination {
    margin: 40px 0;
    text-align: center;
    transition: opacity 0.3s ease;
}

.projects-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.projects-pagination .nav-links a,
.projects-pagination .nav-links .current {
    padding: 8px 12px;
    background: #f8f8f8;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.projects-pagination .nav-links a:hover,
.projects-pagination .nav-links .current {
    background: #b02b2c;
    color: #fff;
}

.projects-pagination .nav-links .dots {
    padding: 8px 12px;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-filters {
        padding: 20px;
    }

    .filter-cloud-section h4 {
        font-size: 1em;
    }

    .category-cloud,
    .tag-cloud {
        gap: 6px;
    }

    .filter-tag {
        padding: 5px 10px;
        font-size: 13px;
    }

    .clear-filters-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        margin: 30px 0;
    }
    
    /* Fallback for flexbox */
    @supports not (display: grid) {
        .project-grid-item {
            -webkit-flex: 0 0 calc(50% - 20px);
            -ms-flex: 0 0 calc(50% - 20px);
            flex: 0 0 calc(50% - 20px);
            margin: 10px;
        }
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    @supports not (display: grid) {
        .project-grid-item {
            -webkit-flex: 0 0 100%;
            -ms-flex: 0 0 100%;
            flex: 0 0 100%;
            margin: 10px 0;
        }
    }

    .project-grid-item .project-info {
        padding: 15px;
    }

    .project-grid-item .project-thumbnail {
        height: 150px;
    }

    .template-projects .page-thumb img {
        max-height: 250px;
    }

    .template-projects .project-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .template-projects .gallery-item img {
        height: 120px;
    }

    .template-projects .project-meta {
        padding: 15px;
        margin: 20px 0;
    }

    .template-projects .entry-content {
        margin-bottom: 15px;
    }
}