/*
 * TroyMet Custom Overrides
 * Loads after styles.css (main.css) to preserve base stylesheet.
 */

/* ==========================================================================
   GENERAL
   ========================================================================== */
.grecaptcha-badge {
    visibility: hidden;
}

/* ==========================================================================
   MEGAMENU OVERRIDES
   ========================================================================== */

.megamenu-featured-title {
    padding-bottom: 0;
    border-bottom: none;
}

.megamenu-featured-desc {
    padding-top: 12px;
    border-top: 2px solid var(--menu-featured-accent-color, var(--troy-red));
}

.megamenu.megamenu-no-featured .megamenu-content {
    flex: 0 0 100%;
    max-width: 100%;
}

.megamenu-category-title {
    border-bottom: 2px solid var(--menu-accent-color, var(--troy-red));
}

/* ==========================================================================
   PRODUCT TABS / GRID OVERRIDES
   ========================================================================== */

.product-tabs .nav-link.active {
    background-color: var(--pb-tab-color, var(--troy-red));
}

.product-tabs .nav-link.active::after {
    border-top: 12px solid var(--pb-tab-color, var(--troy-red));
}

.product-tabs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 170px;
    gap: 24px;
}

.product-tabs-grid-item {
    min-width: 0;
}

.product-tabs-grid-item.is-featured {
    grid-column: span 2;
    grid-row: span 2;
}

.product-tabs-grid .product-card {
    min-height: 170px;
    height: 100%;
}

.product-card:hover .product-card-title h5 {
    color: var(--pb-tab-color, var(--troy-red));
}

.product-card-line {
    background-color: var(--pb-tab-color, var(--troy-red));
}

.product-tabs-grid-item.is-featured .product-card-featured {
    min-height: 100%;
    height: 100%;
}

.product-card-featured-divider {
    background-color: var(--pb-tab-color, var(--troy-red));
}

.product-card-featured-content h4,
.product-card-featured:hover .product-card-featured-content h4 {
    color: var(--pb-tab-color, var(--troy-red));
}

@media (max-width: 991.98px) {
    .product-tabs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 160px;
        gap: 16px;
    }

    .product-tabs-grid .product-card {
        min-height: 160px;
    }
}

@media (max-width: 767.98px) {
    .product-tabs-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 12px;
    }

    .product-tabs-grid-item.is-featured {
        grid-column: span 1;
        grid-row: span 1;
    }

    .product-tabs-grid .product-card {
        min-height: 130px;
        height: auto;
    }
}

/* ==========================================================================
   SOCIAL POSTS OVERRIDES
   ========================================================================== */

.social-posts-swiper .swiper-slide,
.cpb-social-posts-swiper .swiper-slide {
    height: auto;
}

.cpb-social-posts-swiper {
    overflow: visible;
}

.cpb-social-posts-swiper .swiper-slide {
    width: 280px;
    height: auto;
}

.social-post-card {
    width: 100%;
    aspect-ratio: 1 / 1;
}

/* ==========================================================================
   CONTACT FORM OVERRIDES
   ========================================================================== */

.contact-form textarea.form-control {
    min-height: auto;
}

/* ==========================================================================
   COOKIE NOTIFICATION
   ========================================================================== */

.cookie-notification {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #ececec;
    padding: 1.25rem 2rem;
    z-index: 999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-notification.hidden {
    display: none;
}

.cookie-notification.fade-out {
    opacity: 0;
    transform: translateY(100%);
}

.cookie-notification .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-notification-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--font-gray, #555);
    margin: 0;
}

.cookie-notification-text p {
    margin: 0;
}

.btn-cookie {
    flex-shrink: 0;
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid #282828;
    border-radius: 0;
    background-color: #fff;
    color: #282828;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-cookie:hover {
    background-color: #282828;
    color: #fff;
}

@media (max-width: 767.98px) {
    .cookie-notification .container {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-notification-text {
        font-size: 0.75rem;
        text-align: justify;
    }

    .btn-cookie {
        width: 100%;
    }
}

/* ================================================================
   BLOG INDEX
   ================================================================ */

/* --- Grid section --- */
.blog-index-section {
    padding: 3rem 0 5rem;
}

.blog-index-empty {
    font-size: 1rem;
    color: var(--font-gray);
    padding: 2rem 0;
}

/* --- Card (clone of .related-article-card) --- */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.blog-card:hover {
    text-decoration: none;
    color: inherit;
}

/* Thumbnail (clone of .related-article-image) */
.blog-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    background: var(--light-gray);
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.05);
}

/* Content area (clone of .related-article-content) */
.blog-card__content {
    background-color: var(--light-gray);
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

.blog-card:hover .blog-card__content {
    background-color: #d9d9d9;
}

/* Meta row: date + divider + category (based on .related-article-category) */
.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.blog-card__date,
.blog-card__cat {
    font-family: var(--primary-font);
    font-size: 11px;
    font-weight: 400;
    color: var(--font-gray);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.blog-card__meta-divider {
    display: inline-block;
    width: 1px;
    height: 10px;
    background-color: var(--font-gray);
    flex-shrink: 0;
    opacity: 0.5;
}

/* Title (clone of .related-article-title) */
.blog-card__title {
    font-family: var(--heading-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card__title {
    color: var(--troy-red);
}

/* Infinite scroll sentinel */
.blog-load-sentinel {
    display: flex;
    justify-content: center;
    padding: 2.5rem 0 1rem;
    min-height: 3rem;
}

.blog-load-sentinel:not(.is-loading) .blog-load-spinner {
    display: none;
}

.blog-load-spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #e0e0e0;
    border-top-color: var(--troy-red);
    border-radius: 50%;
    animation: blog-spin 0.75s linear infinite;
}

@keyframes blog-spin {
    to {
        transform: rotate(360deg);
    }
}

/****CAMPAIGN POPUP FORM START****/
.campaign-popup-wrapper {
    position: relative;
}

.campaign-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #555;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}

.campaign-popup-close:hover {
    background: #f0f0f0;
    color: #111;
}

.campaign-popup-wrapper-real {
    width: 860px;
    max-width: 95vw;
    margin: 0 auto;
    background: #fff;
    display: flex;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, .4);
}

.campaign-popup-media {
    flex: 0 0 38%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.campaign-popup-media .campaign-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.campaign-popup-content {
    flex: 1;
    padding: 28px 32px;
}

.campaign-title {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 700;
}

.campaign-desc {
    margin-bottom: 14px;
}

@media (max-width: 680px) {
    .campaign-popup-wrapper {
        flex-direction: column;
        width: 540px;
    }

    .campaign-popup-media {
        height: 170px;
    }
}

/****CAMPAIGN POPUP FORM END****/