/*
Theme Name: The Barn Landscape Supply
Theme URI: http://example.com/
Description: Child theme for The Barn Landscape Supply based on the Divi theme.
Author: Your Name
Author URI: http://example.com/
Template: Divi
Version: 1.0.0
*/

@import url("../Divi/style.css");

/* Add your custom CSS below this line */

/* Base styles for the products list */
.products-list {
    display: grid;
    grid-gap: 20px;
    margin-bottom: 40px;
}

/* Adjust grid columns based on the number specified */
.products-columns-1 {
    grid-template-columns: 1fr;
}

.products-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.products-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.products-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.products-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Style for product items */
.product-item {
    border: 1px solid #ddd;
    padding: 15px;
    background-color: #fff;
}

/* Product image */
.product-image {
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;
}

.product-image img.product-featured-image {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Ensures the image fills the container without stretching */
}

/* Product details */
.product-details {
    text-align: left;
}

.product-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.product-description {
    font-size: 14px;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .products-columns-3,
    .products-columns-4,
    .products-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-list {
        grid-template-columns: 1fr;
    }
}

/* Featured Jobs Styles */

/* Home Page Featured Job Section */
.et_pb_section_featured_job {
    padding: 60px 0;
}

.et_pb_row_featured_job {
    display: flex;
    align-items: center;
    gap: 40px;
}

.et_pb_column_featured_job_text {
    flex: 1;
}

.et_pb_column_featured_job_image {
    flex: 1;
}

.et_pb_text_featured_job_heading h2 {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
}

.et_pb_text_featured_job_content h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #444;
}

.et_pb_text_featured_job_content p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.et_pb_image_featured_job {
    border-radius: 8px;
    overflow: hidden;
}

.featured-job-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #999;
    font-size: 16px;
    min-height: 300px;
    border-radius: 8px;
}

/* Single Featured Job Page */
.single-featured_jobs #main-content {
    width: 100%;
    max-width: none;
}

.single-featured_jobs #content-area,
.post-type-archive-featured_jobs #content-area,
body.archive.post-type-archive-featured_jobs #content-area {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.single-featured_jobs #content-area::before,
.single-featured_jobs #content-area::after {
    display: none !important;
}

.single-featured_jobs #main-content .container::before,
.single-featured_jobs.et_right_sidebar #main-content .container::before,
.post-type-archive-featured_jobs #main-content .container::before,
.post-type-archive-featured_jobs.et_right_sidebar #main-content .container::before,
body.archive.post-type-archive-featured_jobs #main-content .container::before,
body.archive.post-type-archive-featured_jobs.et_right_sidebar #main-content .container::before {
    display: none !important;
}

.single-featured_jobs #left-area,
.post-type-archive-featured_jobs #left-area,
body.archive.post-type-archive-featured_jobs #left-area {
    width: 100% !important;
    float: none !important;
}

.featured-job-single {
    max-width: none;
    margin: 0;
}

.featured-job-header {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
}

.featured-job-header h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.featured-job-short-desc {
    margin-bottom: 30px;
}

.featured-job-short-desc .lead {
    font-size: 18px;
    color: #666;
    font-style: italic;
}

.featured-job-featured-image {
    margin-bottom: 40px;
    text-align: center;
}

.featured-job-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.featured-job-gallery {
    margin: 40px 0;
}

.featured-job-gallery h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.featured-job-navigation {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.more-featured-jobs {
    text-align: center;
    margin-bottom: 30px;
}

.featured-job-post-nav {
    display: flex;
    justify-content: space-between;
}

.featured-job-post-nav a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.featured-job-post-nav a:hover {
    color: #333;
}

/* Archive Featured Jobs Page */
.featured-jobs-archive {
    margin-top: 30px;
}

.featured-jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.featured-job-archive-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.featured-job-archive-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.featured-job-archive-image {
    overflow: hidden;
}

.featured-job-archive-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-job-archive-item:hover .featured-job-archive-image img {
    transform: scale(1.05);
}

.featured-job-archive-content {
    padding: 20px;
}

.featured-job-archive-content h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.featured-job-archive-content h2 a {
    color: #333;
    text-decoration: none;
}

.featured-job-archive-content h2 a:hover {
    color: #007cba;
}

.featured-job-archive-excerpt p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.featured-job-archive-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.featured-job-archive-link {
    text-align: left;
}

.featured-jobs-pagination {
    text-align: center;
    margin-top: 40px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .et_pb_row_featured_job {
        flex-direction: column;
        gap: 30px;
    }
    
    .et_pb_text_featured_job_heading h2 {
        font-size: 28px;
    }
    
    .et_pb_text_featured_job_content h3 {
        font-size: 20px;
    }
    
    .featured-job-header h1 {
        font-size: 28px;
    }
    
    .featured-jobs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .featured-job-post-nav {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .et_pb_section_featured_job {
        padding: 40px 0;
    }
    
    .et_pb_text_featured_job_heading h2 {
        font-size: 24px;
    }
    
    .et_pb_text_featured_job_content h3 {
        font-size: 18px;
    }
    
    .featured-job-header h1 {
        font-size: 24px;
    }
    
    .featured-job-archive-content {
        padding: 15px;
    }
}

/* Always keep AIOSEO elements collapsed */
#aioseo-settings,
#aioseo-writing-assistant-metabox {
    display: none !important;
}

/* Force AIOSEO writing assistant to stay collapsed */
#aioseo-writing-assistant-metabox.closed .inside {
    display: none !important;
}

#aioseo-writing-assistant-metabox .handlediv {
    pointer-events: none !important;
}

#aioseo-writing-assistant-metabox {
    height: auto !important;
}

#aioseo-writing-assistant-metabox .hndle {
    cursor: default !important;
}

/* Featured Job Meta Information */
.featured-job-meta {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.featured-job-meta div {
    margin-bottom: 10px;
}

.featured-job-meta div:last-child {
    margin-bottom: 0;
}

.featured-job-meta strong {
    color: #333;
}

/* ACF Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.gallery-image-link {
    display: block;
    text-decoration: none;
}

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Mobile responsive gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-image {
        height: 150px;
    }
    
    /* Fix Featured Job heading spacing on mobile */
    #FEATURED_JOB_HEADING {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 10px 20px !important;
        text-align: center !important;
    }
    
    #FEATURED_JOB_HEADING .et_pb_text_inner p {
        letter-spacing: 1px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    #FEATURED_JOB_AREA_IMAGE_COLUMN {
        min-height: 250px !important;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .featured-job-meta {
        padding: 15px;
    }
    
    /* Further optimize Featured Job heading for small screens */
    #FEATURED_JOB_HEADING {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 8px 15px !important;
        text-align: center !important;
    }
    
    #FEATURED_JOB_HEADING .et_pb_text_inner p {
        letter-spacing: 0.5px !important;
        font-size: 12px !important;
        text-align: center !important;
    }
    
    #FEATURED_JOB_AREA_IMAGE_COLUMN {
        min-height: 200px !important;
    }
}

/* Featured Jobs Button Styling */
.featured-job-archive-link .et_pb_button,
.more-featured-jobs .et_pb_button,
.single-featured_jobs .et_pb_button {
    background-color: #e22a20 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    display: inline-block !important;
    position: relative !important;
    overflow: hidden !important;
}

.featured-job-archive-link .et_pb_button:hover,
.more-featured-jobs .et_pb_button:hover,
.single-featured_jobs .et_pb_button:hover {
    background-color: #c41e1a !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

/* Mobile Menu Styling */
#mobile_menu1 {
    background-color: #e22a20 !important;
    border: 1px solid #d02419 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
}

#mobile_menu1 a {
    color: #ffffff !important;
    background-color: #e22a20 !important;
    border-bottom: 1px solid #d02419 !important;
    font-size: 14px !important;
}

@media (max-width: 480px) {
    #mobile_menu1 a {
        font-size: 12px !important;
        padding: 8px 12px !important;
        height: auto !important;
    }
}

#mobile_menu1 a:hover {
    color: #ffffff !important;
    background-color: #c41e1a !important;
}

#mobile_menu1 .menu-item-has-children > a:after {
    color: #ffffff !important;
}

/* More specific mobile menu selectors */
.et_mobile_menu,
#et-mobile-navigation {
    background-color: #e22a20 !important;
    border: 1px solid #d02419 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2) !important;
}

.et_mobile_menu a,
#et-mobile-navigation a {
    color: #ffffff !important;
    background-color: #e22a20 !important;
    border-bottom: 1px solid #d02419 !important;
    font-size: 14px !important;
}

@media (max-width: 480px) {
    .et_mobile_menu a,
    #et-mobile-navigation a {
        font-size: 12px !important;
        padding: 8px 12px !important;
        height: auto !important;
    }
}

.et_mobile_menu a:hover,
#et-mobile-navigation a:hover {
    color: #ffffff !important;
    background-color: #c41e1a !important;
}

/* Mobile menu toggle button */
.et_mobile_nav_menu .mobile_nav {
    background-color: #e22a20 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

.et_mobile_nav_menu .mobile_nav:before {
    color: #ffffff !important;
}

/* Add 'MENU' text to mobile menu button */
.et_mobile_nav_menu .mobile_nav:after {
    content: "MENU" !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-left: 6px !important;
    display: inline !important;
}

@media (max-width: 480px) {
    .et_mobile_nav_menu .mobile_nav:after {
        font-size: 17px !important;
        margin-left: 4px !important;
    }
}

/* Mobile menu dropdown styling */
#mobile_menu1 li li a,
.et_mobile_menu li li a {
    background-color: #d02419 !important;
    color: #ffffff !important;
    padding-left: 30px !important;
    border-bottom: 1px solid #c41e1a !important;
}

#mobile_menu1 li li a:hover,
.et_mobile_menu li li a:hover {
    background-color: #c41e1a !important;
    color: #ffffff !important;
}

/* Gallery Modal Styles */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.gallery-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
}

#gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
}

.gallery-modal-close:hover {
    color: #e22a20;
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-nav-btn {
    background-color: rgba(226, 42, 32, 0.8);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    pointer-events: all;
    transition: background-color 0.3s ease;
}

.gallery-nav-btn:hover {
    background-color: #e22a20;
}

.gallery-counter {
    color: white;
    margin-top: 15px;
    font-size: 16px;
}

.modal-open {
    overflow: hidden;
}

/* Mobile modal adjustments */
@media (max-width: 768px) {
    .gallery-modal-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    #gallery-modal-image {
        max-height: 70vh;
    }
    
    .gallery-modal-close {
        top: -30px;
        font-size: 28px;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .gallery-counter {
        font-size: 14px;
    }
}
