/* Certificate Page Styles */

/* Base Collection Card Styles (inherits from collections.css if loaded, but defining just in case) */
/* Assuming .collection-card is defined in collections.css, focusing on modifiers */

/* Certificate Card Colors */
/* General Audience (Green) */
.collection-card.cert-G,
.collection-card.cert-TV-G,
.collection-card.cert-U,
.collection-card.cert-UA {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

/* Parental Guidance (Blue) */
.collection-card.cert-PG,
.collection-card.cert-TV-PG {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
    color: white;
}

/* Parents Cautioned (Orange/Yellow) */
.collection-card.cert-PG-13,
.collection-card.cert-TV-14,
.collection-card.cert-12A {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    color: white;
}

/* Restricted (Red) */
.collection-card.cert-R,
.collection-card.cert-TV-MA,
.collection-card.cert-A {
    background: linear-gradient(135deg, #cb2d3e 0%, #ef473a 100%);
    color: white;
}

/* Adults Only (Dark/Black) */
.collection-card.cert-NC-17,
.collection-card.cert-X {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white;
}

/* Not Rated / Other (Grey) */
.collection-card.cert-Not-Rated,
.collection-card.cert-NR,
.collection-card.cert-Unrated {
    background: linear-gradient(135deg, #757f9a 0%, #d7dde8 100%);
    color: white;
}

/* Family Friendly Section */
.family-friendly-section {
    max-width: 95%;
    margin: 20px auto;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 15px;
}

.family-friendly-title {
    color: #166534;
    font-size: 1.2em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Certificate Header (Detail View) */
.cert-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin: 15px auto;
    max-width: 95%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Dynamic header colors based on certificate */
.cert-header.cert-G,
.cert-header.cert-U {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.cert-header.cert-PG {
    background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
}

.cert-header.cert-PG-13 {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.cert-header.cert-R {
    background: linear-gradient(135deg, #cb2d3e 0%, #ef473a 100%);
}

.cert-header.cert-NC-17 {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

.cert-header h2 {
    margin: 0 0 10px 0;
    font-size: 2em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.cert-header .cert-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.cert-header .cert-stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.cert-header .cert-stat-value {
    font-size: 1.3em;
    font-weight: bold;
    display: block;
}

.cert-header .cert-stat-label {
    font-size: 0.8em;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cert-description {
    font-style: italic;
    opacity: 0.9;
    font-size: 0.95em;
    margin-bottom: 5px;
}

/* Category Select */
.cert-category-select {
    max-width: 95%;
    margin: 15px auto;
    text-align: center;
}

.cert-category-select select {
    padding: 8px 30px 8px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 1em;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    outline: none;
    cursor: pointer;
}

/* Grid Layout for Certificates */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-width: 95%;
    margin: 0 auto 20px;
}

.collection-card {
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.collection-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.collection-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.5em;
}

.collection-card p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

/* Sort Tabs (reused from decades/genres pattern usually) */
.cert-sort-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    max-width: 95%;
    margin: 0 auto 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.cert-sort-tabs a {
    padding: 8px 16px;
    text-decoration: none;
    color: #666;
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 0.9em;
}

.cert-sort-tabs a.active {
    background-color: #333;
    color: white;
}

@media (max-width: 600px) {
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cert-header h2 {
        font-size: 1.6em;
    }

    .cert-header .cert-stats {
        gap: 15px;
    }

    .cert-header .cert-stat {
        flex: 1;
        min-width: 80px;
    }
}