/* Detail Page Specific Styles */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background-color: #ffffff;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.breadcrumb a:hover {
    color: #0056b3;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #6c757d;
}

.breadcrumb .current {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Main Detail Content */
.detail-content {
    background-color: #ffffff;
    padding: 2rem 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.page-header .tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Image Section */
.image-section {
    text-align: center;
    margin-bottom: 3rem;
}

.main-image {
    display: inline-block;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-buttons .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.download-btn {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.download-btn:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.print-btn {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.print-btn:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.share-btn {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.share-btn:hover {
    background-color: #0056b3;
    border-color: #004085;
}

/* Content Section */
.content-section {
    max-width: 700px;
    margin: 0 auto;
}

/* Dinosaur Info */
.dinosaur-info {
    margin-bottom: 3rem;
}

.dinosaur-info h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.dinosaur-info p {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* Facts Grid */
.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.fact-item {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 0.875rem;
}

.fact-item strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Coloring Tips */
.coloring-tips {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    border-left: 4px solid #007bff;
    margin-bottom: 2rem;
}

.coloring-tips h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.coloring-tips ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.coloring-tips li {
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

/* Fun Facts */
.fun-facts {
    background-color: #fff3cd;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

.fun-facts h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.fun-facts ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.fun-facts li {
    color: #495057;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

/* Related Pages */
.related-pages {
    background-color: #f8f9fa;
    padding: 3rem 0;
    border-top: 1px solid #e9ecef;
}

.related-pages h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.related-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.related-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.related-item h3,
.related-item h4 {
    padding: 1rem;
    color: #2c3e50;
    text-align: center;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.3;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: -10px;
    right: 10px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover {
    color: #f39c12;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .main-image img {
        max-width: 100%;
    }

    .action-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .action-buttons .btn,
    .action-buttons .share-btn-container {
        flex: 1;
        min-width: 0;
        text-align: center;
    }

    .action-buttons .btn {
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        white-space: nowrap;
        height: auto;
        min-height: 40px;
    }

    .action-buttons .btn i {
        margin-bottom: 0;
        margin-right: 0.5rem;
        font-size: 0.9rem;
    }

    .share-btn-container {
        position: relative;
        flex: 1;
        min-width: 0;
    }

    .share-btn-container .btn {
        width: 100%;
        padding: 0.5rem 0.5rem;
        font-size: 0.8rem;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        height: 40px;
        display: flex;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .share-btn-container .btn i {
        margin-bottom: 0;
        margin-right: 0.5rem;
        font-size: 0.9rem;
    }

    .facts-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .coloring-tips {
        padding: 1.5rem;
    }
}
