/**
 * Project Grid Shortcode Styles
 * Responsive grid layout with pagination navigation
 */

:root {
    --color-button-text: #FFFFFF;
    --color-button-text-hover: #6b6b6b;
    --color-bg: #043284;
    --color-button-background-gradient-one: #B10707;
    --color-button-background-gradient-two: #810707;
    --color-button-box-shadow: #DE7171;
    --color-border-box: #F6F6F6;
    --color-bg-card: #E5E7F0;
    --color-bg-card-hover: #69B5F8;
    --color-bg-card-hover-two: #2B2EEE;
    --color-icon: #C7E3F3;
    --color-bg-item: #FAFAFA;
}

/* Main Wrapper */
.project-grid-wrapper {
    font-family: 'UTM Daxline';
    padding: 40px 20px;
    background: #FFFFFF;
}

/* Category Section */
.project-category-section {
    max-width: 1200px;
    margin: 0 auto;
}

/* Category Title & Description */
.category-title {
    font-family: 'UTM Daxline';
    font-size: 48px;
    font-weight: 700;
    color: #043284;
    text-align: center;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.category-description {
    font-family: 'UTM Daxline';
    font-weight: 400;
    justify-content: center;
    margin-bottom: 40px;
    text-align: center;
    font-size: 20px;
    line-height: 1.6;
    color: #000000;
}

/* Grid Container with Navigation */
.project-grid-container {
    position: relative;
    min-height: 400px;
}

/* Project Grid */
.project-grid {
    display: grid;
    gap: 10px;
    position: relative;
    z-index: 1;
}

/* Dynamic grid based on item count */
.project-grid[data-item-count="1"] {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

.project-grid[data-item-count="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.project-grid[data-item-count="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.project-grid[data-item-count="4"] {
    grid-template-columns: repeat(4, 1fr);
}

/* 5+ items: 4 columns, 2 rows */
.project-grid:not([data-item-count="1"]):not([data-item-count="2"]):not([data-item-count="3"]):not([data-item-count="4"]) {
    grid-template-columns: repeat(4, 1fr);
}

/* Project Item */
.project-item {
    opacity: 1;
    transition: opacity 0.3s ease;
    background: var(--color-bg-item);
}

.project-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 20px;
    background: var(--color-bg-item);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.project-card:hover {
    border-color: #69B5F8;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
}

/* Project Image (Logo) */
.project-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.project-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Hide overlay and content for logo-only layout */
.project-overlay,
.project-content {
    display: none;
}

/* Navigation Arrows - Pagination Style */
.project-grid-nav {
    padding: 0px !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    background: transparent !important;
    border: 1.5px solid var(--color-bg) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    z-index: 100 !important;
}

.project-grid-nav.prev {
    left: -60px !important;
    right: auto !important;
}

.project-grid-nav.next {
    right: -60px !important;
    left: auto !important;
}

.project-grid-nav svg {
    width: 18px !important;
    height: 18px !important;
    stroke: var(--color-bg) !important;
    transition: all 0.25s ease !important;
}

.project-grid-nav svg path {
    stroke: var(--color-bg) !important;
    transition: stroke 0.25s ease !important;
}

.project-grid-nav:hover:not(:disabled) {
    background: var(--color-bg-card-hover) !important;
}


.project-grid-nav:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .project-grid[data-item-count="3"] {
        grid-template-columns: repeat(3, 1fr);
    }

    .project-grid[data-item-count="4"],
    .project-grid:not([data-item-count="1"]):not([data-item-count="2"]):not([data-item-count="3"]) {
        grid-template-columns: repeat(3, 1fr);
    }

    .project-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .project-grid-wrapper {
        padding: 60px 15px;
    }

    .project-grid[data-item-count="2"],
    .project-grid[data-item-count="3"],
    .project-grid[data-item-count="4"],
    .project-grid:not([data-item-count="1"]) {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-grid {
        gap: 15px;
    }

    .project-card {
        min-height: 140px;
        padding: 30px 20px;
    }

    .project-image img {
        max-width: 140px;
        max-height: 80px;
    }
}

@media (max-width: 480px) {

    .project-grid,
    .project-grid[data-item-count="2"],
    .project-grid[data-item-count="3"],
    .project-grid[data-item-count="4"] {
        grid-template-columns: 1fr;
    }

    .category-title {
        font-size: 28px;
    }

    .category-description {
        font-size: 16px;
    }
}