/* ==========================================================================
   SERA CERAMICS - CERTIFICATES & DECLARATIONS STYLESHEET
   Fully Responsive & Mobile-Optimized
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

.certificates-page-wrapper {
    font-family: 'Figtree', sans-serif;
    color: #616161;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-width: 0;
}

/* Grand Hero Banner - matches the collection-detail page banner size (h-[800px], full width, cover) */
.certificates-hero-banner {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    background-color: #111827;
    overflow: hidden;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .certificates-hero-banner {
        height: 550px;
    }
}

@media (min-width: 768px) {
    .certificates-hero-banner {
        height: 650px;
    }
}

@media (min-width: 1024px) {
    .certificates-hero-banner {
        height: 800px;
    }
}

.certificates-hero-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}

.certificates-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.80) 0%, rgba(0, 0, 0, 0.70) 50%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .certificates-hero-overlay {
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.30) 100%);
    }
}

.certificates-hero-content {
    position: relative;
    z-index: 10;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .certificates-hero-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) {
    .certificates-hero-content {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }
}

.certificates-hero-title {
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 600;
    color: #ffffff !important;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 480px) {
    .certificates-hero-title {
        font-size: 2.75rem;
    }
}

@media (min-width: 640px) {
    .certificates-hero-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 768px) {
    .certificates-hero-title {
        font-size: 4.25rem;
    }
}

@media (min-width: 1024px) {
    .certificates-hero-title {
        font-size: 5.5rem;
    }
}

.certificates-hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #f3f4f6 !important;
    font-weight: 300;
    letter-spacing: 0.01em;
    max-width: 850px;
    margin-top: 0.5rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (min-width: 640px) {
    .certificates-hero-subtitle {
        font-size: 1.15rem;
        line-height: 1.75;
        margin-top: 1rem;
    }
}

@media (min-width: 1024px) {
    .certificates-hero-subtitle {
        font-size: 1.25rem;
        line-height: 1.85;
    }
}

/* Certificate Cards */
.certificate-collection-card {
    background-color: #ffffff;
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid #f3f4f6;
    transform: none !important;
    transition: none;
    box-sizing: border-box;
}

.certificate-collection-card:hover {
    transform: none !important;
    box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border-color: #f3f4f6;
}

.certificate-img-container {
    width: 100%;
    height: 12rem;
    overflow: hidden;
    position: relative;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .certificate-img-container {
        height: 14rem;
    }
}

@media (min-width: 640px) {
    .certificate-img-container {
        height: 18rem;
    }
}

.certificate-img-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.certificate-collection-card img {
    transform: none !important;
    transition: none !important;
}

.certificate-collection-card:hover img {
    transform: none !important;
}

/* Certificate Card Content */
.certificate-card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

@media (min-width: 480px) {
    .certificate-card-body {
        padding: 1.25rem;
    }
}

@media (min-width: 640px) {
    .certificate-card-body {
        padding: 1.5rem;
    }
}

/* Certificate Meta Details */
.certificate-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #616161;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

@media (min-width: 640px) {
    .certificate-title {
        font-size: 1.25rem;
    }
}

.certificate-desc {
    font-size: 0.875rem;
    line-height: 1.625;
    color: #616161;
    font-weight: 300;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.certificate-badge {
    display: inline-block;
    background-color: #ebf5fb;
    color: #065B95;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid #d4e6f1;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.certificate-collection-card * {
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

/* Responsive Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (min-width: 640px) {
    .certificates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .certificates-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }
}

/* Card Reveal Animation */
@keyframes fadeInUpCard {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-fade-in {
    animation: fadeInUpCard 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
