/**
 * Frontend-Styles für Firmengeschichten
 * 
 * @package SchoeneAktien
 * @since 1.0.0
 */

/* ===========================
   Archiv-Seite - Allgemein
   =========================== */

.firmengeschichten-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.firmengeschichten-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 3px solid #a85639;
}

.firmengeschichten-header .page-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 700;
}

.firmengeschichten-header .archive-description {
    font-size: 1.2em;
    color: #7f8c8d;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===========================
   Suchformular & Filter
   =========================== */

.firmengeschichten-controls {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.firmengeschichten-search {
    margin-bottom: 30px;
}

.firmengeschichten-search .search-form {
    display: flex;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(168, 86, 57, 0.1);
    border-radius: 50px;
    overflow: hidden;
    background: white;
}

.firmengeschichten-search .search-form label {
    flex: 1;
    margin: 0;
}

.firmengeschichten-search .search-field {
    width: 100%;
    padding: 18px 30px;
    font-size: 17px;
    border: 2px solid transparent;
    background: transparent;
    transition: all 0.3s;
    font-family: inherit;
}

.firmengeschichten-search .search-field::placeholder {
    color: #95a5a6;
    font-style: italic;
}

.firmengeschichten-search .search-field:focus {
    outline: none;
    border-color: transparent;
}

.firmengeschichten-search .search-form:focus-within {
    box-shadow: 0 6px 30px rgba(168, 86, 57, 0.2);
    transform: translateY(-2px);
}

.firmengeschichten-search .search-submit {
    padding: 0 35px;
    background: #a85639;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.firmengeschichten-search .search-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s;
}

.firmengeschichten-search .search-submit:hover {
    background: #8a4428;
    transform: scale(1.02);
}

.firmengeschichten-search .search-submit:hover::before {
    width: 100%;
}

.firmengeschichten-search .search-submit .dashicons {
    width: 22px;
    height: 22px;
    font-size: 22px;
    position: relative;
    z-index: 1;
}

.firmengeschichten-search .search-submit .screen-reader-text {
    position: relative;
    z-index: 1;
}

/* Alphabetischer Filter */
.firmengeschichten-alphabet-filter {
    text-align: center;
}

.alphabet-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.alphabet-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.alphabet-btn {
    display: inline-block;
    padding: 8px 12px;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 40px;
    text-align: center;
}

.alphabet-btn:hover {
    background: #a85639;
    color: white;
    border-color: #a85639;
    transform: translateY(-2px);
}

.alphabet-btn.active {
    background: #a85639;
    color: white;
    border-color: #a85639;
}

/* ===========================
   Firmengeschichten Grid
   =========================== */

.firmengeschichten-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.firmengeschichte-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.firmengeschichte-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.firmengeschichte-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-header {
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.4em;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.card-title a:hover {
    color: #a85639;
}

.card-subtitle {
    color: #7f8c8d;
    font-size: 0.95em;
    margin: 0;
    font-style: italic;
}

.card-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: #a85639;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.read-more-btn:hover {
    background: #8a4428;
}

.read-more-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.products-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
}

.products-badge .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

/* ===========================
   Keine Ergebnisse
   =========================== */

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.no-results-message {
    font-size: 1.2em;
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* ===========================
   Pagination
   =========================== */

.pagination {
    margin-top: 50px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination a,
.pagination .current {
    padding: 10px 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #a85639;
    color: white;
    border-color: #a85639;
}

.pagination .current {
    background: #a85639;
    color: white;
    border-color: #a85639;
    font-weight: 600;
}

/* ===========================
   Detail-Seite
   =========================== */

.firmengeschichte-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.firmengeschichte-article {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.9em;
}

.breadcrumb a {
    color: #a85639;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #8a4428;
}

.breadcrumb .separator {
    margin: 0 10px;
    color: #ddd;
}

.breadcrumb .current {
    color: #7f8c8d;
}

/* Header */
.entry-header {
    margin-bottom: 30px;
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 3px solid #a85639;
}

.entry-title {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.2;
}

.entry-subtitle {
    font-size: 1.3em;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 20px;
}

.entry-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    color: #7f8c8d;
}

.entry-meta > span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.entry-meta .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Featured Image */
.entry-featured-image {
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
}

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

/* Content */
.entry-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2,
.entry-content h3 {
    color: #2c3e50;
    margin-top: 2em;
    margin-bottom: 1em;
}

/* ===========================
   Verknüpfte Produkte
   =========================== */

.related-products-section {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 40px;
}

.related-products-section .section-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-products-section .section-title .dashicons {
    width: 30px;
    height: 30px;
    font-size: 30px;
    color: #a85639;
}

.section-description {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.05em;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.85em;
}

.sale-badge {
    background: #e74c3c;
    color: white;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1em;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.product-sku {
    font-size: 0.85em;
    color: #95a5a6;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #a85639;
    margin-bottom: 10px;
}

.product-price del {
    color: #95a5a6;
    margin-right: 10px;
    font-size: 0.9em;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    font-weight: 600;
}

.stock-status.in-stock {
    color: #27ae60;
}

.stock-status.out-of-stock {
    color: #e74c3c;
}

.stock-status .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.product-actions {
    padding: 0 20px 20px;
}

.product-actions .button {
    width: 100%;
    text-align: center;
    padding: 12px;
    background: #a85639;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.product-actions .button:hover {
    background: #8a4428;
}

/* ===========================
   Navigation Links
   =========================== */

.entry-footer {
    margin-top: 50px;
}

.navigation-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.nav-link:hover {
    background: #a85639;
    color: white;
    border-color: #a85639;
    transform: translateY(-3px);
}

.nav-direction {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
    font-weight: 600;
}

.nav-link:hover .nav-direction {
    color: white;
}

.nav-title {
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
}

.nav-link:hover .nav-title {
    color: white;
}

.next-link .nav-direction {
    justify-content: flex-end;
}

.back-to-archive {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    background: white;
    color: #2c3e50;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.button-secondary:hover {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .firmengeschichten-header .page-title {
        font-size: 2em;
    }
    
    .firmengeschichten-grid {
        grid-template-columns: 1fr;
    }
    
    .alphabet-buttons {
        gap: 5px;
    }
    
    .alphabet-btn {
        padding: 6px 10px;
        min-width: 35px;
    }
    
    .entry-title {
        font-size: 1.8em;
    }
    
    .related-products-grid {
        grid-template-columns: 1fr;
    }
    
    .navigation-links {
        grid-template-columns: 1fr;
    }
    
    .firmengeschichte-article {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .firmengeschichten-search .search-form {
        flex-direction: column;
    }
    
    .firmengeschichten-controls {
        padding: 20px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .read-more-btn {
        text-align: center;
        justify-content: center;
    }
}

/* ===========================
   Loading Indicator
   =========================== */

.loading-indicator {
    text-align: center;
    padding: 30px;
}

.loading-indicator .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #a85639;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    color: #7f8c8d;
    font-size: 1em;
    margin: 0;
}

/* Fade-in Animation für neue Cards */
.firmengeschichte-card {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
   Hilfsklassen
   =========================== */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}
