/* =====================================================
   metaltavan.com — Enhancements
   Category hubs, AEO blocks, certifications, installation
   ===================================================== */

/* Category grid (homepage + category pages) */
.categories-section {
    padding: 4rem 0 2rem;
    background: #f8fafc;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #1e293b;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    border-color: #2563eb;
    box-shadow: 0 12px 24px rgba(30, 58, 95, 0.12);
}

.category-card-name {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e3a5f;
}

.category-card-tagline {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
}

.category-card-arrow {
    margin-top: auto;
    align-self: flex-end;
    color: #2563eb;
}

/* Category hero */
.category-hero {
    padding: 3rem 0 1.5rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #ffffff 100%);
}

.category-hero .section-title {
    margin-bottom: 0.75rem;
}

.category-tagline {
    font-size: 1.15rem;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 1rem;
}

.category-description {
    max-width: 60rem;
    color: #475569;
    line-height: 1.7;
}

.category-description p {
    margin: 0 0 0.9rem;
}

/* Product page: category hub link */
.product-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.product-hub-link:hover {
    text-decoration: underline;
}

/* AIO quick answer */
.aio-answer {
    margin: 1.25rem 0;
    padding: 1rem 1.25rem;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 0 10px 10px 0;
}

.aio-answer-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563eb;
    margin-bottom: 0.35rem;
}

.aio-answer p {
    margin: 0;
    color: #1e293b;
    line-height: 1.65;
}

[dir="rtl"] .aio-answer {
    border-left: 0;
    border-right: 4px solid #2563eb;
    border-radius: 10px 0 0 10px;
}

/* Certifications */
.product-certifications {
    margin: 2.5rem 0;
}

.certifications-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
}

.certification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e3a5f;
}

.certification-badge svg {
    color: #16a34a;
    flex: 0 0 auto;
}

/* Installation steps */
.product-installation {
    margin: 2.5rem 0;
}

.installation-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.9rem;
}

.installation-steps li {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.installation-steps .step-number {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #1e3a5f;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
}

.installation-steps .step-text {
    color: #334155;
    line-height: 1.65;
    padding-top: 0.3rem;
}

/* Product FAQ */
.product-faq {
    margin: 2.5rem 0;
}

@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Hero + category imagery
   ===================================================== */

/* Homepage hero photo (behind gradient scrim for text contrast) */
.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero .hero-gradient {
    background: linear-gradient(90deg, rgba(13, 27, 48, 0.88) 0%, rgba(13, 27, 48, 0.62) 45%, rgba(13, 27, 48, 0.3) 100%);
}

/* Category card image */
.category-card-media {
    display: block;
    margin: -1.5rem -1.5rem 0.25rem;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e2e8f0;
}

.category-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-media img {
    transform: scale(1.04);
}

/* Category hero photo (faded full-bleed backdrop) */
.category-hero {
    position: relative;
    overflow: hidden;
}

.category-hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.16;
}

.category-hero .section-container {
    position: relative;
    z-index: 1;
}
