/**
 * Public Header Styles
 * Shared styles for all public views
 *
 * @package    Magazines_Collection
 * @since      0.0.26
 */

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Header Navigation */
.header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
    padding: 1rem 0;
    padding-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.header-content {
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2rem;
}

.header h1 {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    flex: 1;
}

.nav a {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.nav a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    transform: translateY(-1px);
}

.nav a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.user-info a {
    color: #555;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.user-info a:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    transform: translateY(-1px);
}

.user-info .btn-login,
.user-info .btn-signup {
    display: inline-block;
    font-weight: 500;
}

.user-info .btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.user-info .btn-login:hover {
    background: linear-gradient(135deg, #5568d3 0%, #65408b 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.beta-ribbon {
    position: fixed;
    top: 35px;
    left: -60px;
    z-index: 9999;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    padding: 12px 65px;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: rotate(-45deg);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    pointer-events: none;
}

.beta-ribbon .beta-text {
    display: block;
    font-size: 13px;
}

.beta-ribbon .beta-version {
    display: block;
    font-size: 9px;
    font-weight: normal;
    letter-spacing: 1px;
}

/* Common Container */
.container {
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Search Bar */
.search-bar {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Cards */
.magazine-card,
.issue-card,
.article-item,
.author-card,
.topic-card,
.label-card,
.language-card,
.editor-card,
.country-card,
.periodicity-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.magazine-card:hover,
.issue-card:hover,
.article-item:hover,
.author-card:hover,
.topic-card:hover,
.label-card:hover,
.language-card:hover,
.editor-card:hover,
.country-card:hover,
.periodicity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.magazine-card img,
.issue-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Entity list - generic list view for child entities */
.entity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Compact list view with small thumbnails (90px) for issues */
.entity-list .issue-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.entity-list .issue-card > div:first-child {
    flex-shrink: 0;
    width: 90px;
}

.entity-list .issue-card img {
    width: 90px;
    height: auto;
    aspect-ratio: 1 / 1.41;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Legacy support - keep old classes for compatibility */
.issues-list .issue-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.issues-list .issue-card > div:first-child {
    flex-shrink: 0;
    width: 90px;
}

.issues-list .issue-card img {
    width: 90px;
    height: auto;
    aspect-ratio: 1 / 1.41;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.magazine-card-content,
.issue-card-content,
.author-card-content,
.topic-card-content,
.label-card-content {
    padding: 1rem;
}

.magazine-card h3,
.issue-card h3,
.article-item h3,
.author-card h3,
.topic-card h3,
.label-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.magazine-card .meta,
.issue-card .meta,
.article-item .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.magazine-card .description,
.article-item .description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Detail Headers */
.magazine-header,
.issue-header,
.article-header,
.entity-header {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.magazine-header h1,
.issue-header h1,
.issue-header h2,
.article-header h1,
.entity-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

/* Entity Actions */
.entity-actions {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.entity-actions .button {
    min-width: 120px;
}

.entity-title-block {
    flex: 1;
}

.entity-title-block h2 {
    margin-bottom: 0.5rem;
}

.entity-title-block .meta-grid {
    margin-top: 0.25rem;
}

.issue-cover,
.magazine-cover {
    width: 200px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    object-fit: cover;
}

.issue-info,
.magazine-info {
    flex: 1;
}

.magazine-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.magazine-link:hover {
    transform: translateX(5px);
}

/* Meta Grid */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.meta-item {
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.meta-item strong {
    display: block;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.meta-item span {
    color: #2c3e50;
    font-size: 1rem;
}

/* Meta URL Row - Full Width */
.meta-url-row {
    margin-top: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.meta-url-row strong {
    display: inline;
    color: #666;
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.meta-url-row a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.meta-url-row a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Sections */
.issues-section,
.articles-section,
.content-section {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.issues-section h2,
.articles-section h2,
.content-section h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

/* Grids */
.magazines-grid,
.issues-grid,
.authors-grid,
.topics-grid,
.labels-grid,
.languages-grid,
.editors-grid,
.countries-grid,
.periodicities-grid,
.entity-grid,
.entities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Legacy support for articles-list */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.entity-card {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.entity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
}

.entity-card h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.entity-card .count {
    color: #666;
    font-size: 0.9rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s;
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.pagination .current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Article Lists */
.article-item {
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.25);
}

.article-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.article-item .meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.article-item .description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    margin-left: 0.5rem;
    vertical-align: middle;
    position: relative;
    top: -2px;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* Collection Button */
.collection-button {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.collection-button.add {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
    border: 2px solid #667eea;
}

.collection-button.add:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.collection-button.remove {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.collection-button.remove:hover:not(:disabled) {
    background: #f5c6cb;
    box-shadow: 0 2px 8px rgba(114, 28, 36, 0.2);
}

.collection-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Collection Alert */
.collection-alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

.collection-alert.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.collection-alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Breadcrumbs */
.breadcrumb-trail {
    margin-bottom: 1.5rem;
    padding: 0.75rem 0;
}

.breadcrumb-trail ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.breadcrumb-trail li {
    display: inline;
    font-size: 0.9rem;
}

.breadcrumb-trail a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.2s;
}

.breadcrumb-trail a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.breadcrumb-trail .current {
    color: #666;
    font-weight: 500;
}

.breadcrumb-trail .separator {
    color: #999;
    user-select: none;
}

/* Entity Count */
.entity-count {
    color: #666;
    font-size: 1rem;
    margin: 0.5rem 0 0 0;
}
/* ==========================================================================
   Footer Styles
   ========================================================================== */

.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 40px 20px 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-nav a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.footer-nav a:hover {
    color: #667eea;
}

.footer-nav a:hover::after {
    width: 100%;
}

.footer-social a {
    color: white;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.footer-social a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-info {
    text-align: center;
}

.footer-info p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a {
    color: white;
    text-decoration: none;
}

.footer-info a:hover {
    color: #667eea;
}

/* Label Tags */
.label-tag {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 4px 12px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.2s;
}

.label-tag:hover {
    background: #005a87;
    color: #fff;
}

.labels {
    margin-top: 20px;
}

.labels h3 {
    margin-bottom: 10px;
}

.labels > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.labels-inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-left: 8px;
}
