/**
 * Firma Rehberi Frontend Styles - Horizontal Layout Version
 * Modern, clean design compatible with Findus and Zox themes
 */

/* Reset and Base Styles */
.firma-rehberi-archive,
.firma-single-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
}

.firma-rehberi-archive *,
.firma-single-page * {
    box-sizing: border-box;
}

/* Container */
.firma-rehberi-archive .container,
.firma-single-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumbs - Inline Horizontal Layout */
.firma-breadcrumbs {
    margin: 20px 0;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.breadcrumb-link {
    color: #007cba;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #005a87;
    text-decoration: underline;
}

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

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
    font-weight: normal;
}

@media (max-width: 768px) {
    .breadcrumb-container {
        font-size: 12px;
    }
    
    .breadcrumb-separator {
        margin: 0 6px;
    }
}

/* Company Grid - Vertical Stack Layout */
.firma-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px 0;
}

/* Horizontal Company Card Layout */
.firma-card-horizontal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
    width: 100%;
}

.firma-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-color: #007cba;
}

.firma-ads-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.firma-card-content-wrapper {
    display: flex;
    align-items: flex-start;
    padding: 25px;
    gap: 25px;
}

/* Logo Section (Left) */
.firma-card-logo-section {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.firma-logo-container {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
    transition: border-color 0.3s ease;
}

.firma-card-horizontal:hover .firma-logo-container {
    border-color: #007cba;
}

.firma-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.firma-logo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #6c757d;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.firma-card-horizontal:hover .firma-logo-placeholder {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border-color: #007cba;
}

/* Content Section (Right) */
.firma-card-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.firma-card-main-info {
    flex: 1;
}

.firma-card-title {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.firma-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.firma-card-title a:hover {
    color: #007cba;
}

.firma-card-description {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.firma-card-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.firma-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666;
}

.firma-icon {
    flex-shrink: 0;
    opacity: 0.7;
}

.firma-meta-item.location .firma-icon {
    color: #dc3545;
}

.firma-meta-item.sector .firma-icon {
    color: #007cba;
}

/* Action Section (Bottom Right) */
.firma-card-actions {
    align-self: flex-end;
    margin-top: auto;
}

.firma-view-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.firma-view-details-btn:hover {
    background: linear-gradient(135deg, #005a87, #004a73);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.4);
    color: white;
    text-decoration: none;
}

/* Archive Header */
.archive-header {
    text-align: center;
    margin: 40px 0;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
}

.archive-meta {
    color: #666;
    font-size: 16px;
}

/* Search and Filters */
.firma-search-filters {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
    border: 1px solid #e9ecef;
}

.firma-search-form {
    margin-bottom: 20px;
}

.search-input-group {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #007cba;
}

.search-button {
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: 2px solid #007cba;
    border-radius: 0 6px 6px 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: #005a87;
    border-color: #005a87;
}

.firma-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

/* Responsive Design for Horizontal Cards */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .archive-title {
        font-size: 2rem;
    }
    
    .firma-search-filters {
        padding: 20px;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input,
    .search-button {
        border-radius: 6px;
        border: 2px solid #ddd;
    }
    
    .search-button {
        margin-top: 10px;
    }
    
    .firma-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .firma-card-content-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .firma-card-logo-section {
        align-self: center;
        width: 100px;
        height: 100px;
    }
    
    .firma-card-info-section {
        min-height: auto;
    }
    
    .firma-card-actions {
        align-self: center;
        margin-top: 15px;
    }
    
    .firma-card-meta-info {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .firma-card-horizontal {
        margin: 0 -5px 15px -5px;
    }
    
    .firma-card-content-wrapper {
        padding: 15px;
    }
    
    .firma-card-logo-section {
        width: 80px;
        height: 80px;
    }
    
    .firma-card-title {
        font-size: 18px;
    }
    
    .firma-card-description {
        font-size: 14px;
    }
    
    .firma-logo-placeholder {
        font-size: 28px;
    }
}

/* Pagination */
.firma-pagination {
    margin: 40px 0;
    text-align: center;
}

.firma-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.firma-pagination .page-numbers:hover,
.firma-pagination .page-numbers.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* No Results */
.no-companies-found {
    text-align: center;
    padding: 60px 20px;
}

.no-results-content h2 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #333;
}

.no-results-content p {
    color: #666;
    font-size: 16px;
    margin: 0 0 25px 0;
}

/* Accessibility */
.firma-card-horizontal:focus-within,
.firma-view-details-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Loading States */
.firma-loading {
    opacity: 0.6;
    pointer-events: none;
}

.firma-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: firma-spin 1s linear infinite;
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .firma-card-horizontal {
        border: 2px solid #000;
    }
    
    .firma-view-details-btn {
        background: #000;
        border: 2px solid #000;
    }
}

/* Single Company Page Styles */
.firma-single {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    margin: 30px 0;
}

.firma-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 40px;
    position: relative;
    border-bottom: 1px solid #dee2e6;
}

.firma-header-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.firma-header-info {
    flex: 1;
}

.firma-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #333;
    line-height: 1.2;
}

.firma-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.firma-header-meta .firma-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    color: #666;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
}

.firma-short-description {
    font-size: 18px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

.firma-header-logo {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
}

.firma-header-logo .firma-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.firma-header-logo .firma-logo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.firma-contact-section {
    padding: 40px;
    background: white;
    border-bottom: 1px solid #eee;
}

.firma-contact-buttons h3 {
    font-size: 24px;
    margin: 0 0 25px 0;
    color: #333;
    text-align: center;
}

.contact-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.contact-btn .btn-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.contact-btn .btn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-btn .btn-text strong {
    font-size: 16px;
}

.contact-btn .btn-text small {
    font-size: 13px;
    opacity: 0.9;
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25d366, #20b954);
}

.phone-btn {
    background: linear-gradient(135deg, #4285f4, #3367d6);
}

.email-btn {
    background: linear-gradient(135deg, #ea4335, #d33b2c);
}

.website-btn {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

/* Content Sections */
.firma-content {
    padding: 40px;
}

.firma-content h3 {
    font-size: 24px;
    margin: 0 0 20px 0;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

/* Gallery */
.firma-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

/* Video */
.firma-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.firma-video iframe,
.firma-video object,
.firma-video embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

/* Description */
.firma-description {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.firma-description p {
    margin-bottom: 15px;
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef;
}

.social-link:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Share Company Section */
.firma-share-section {
    padding: 40px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.firma-share-section h3 {
    font-size: 24px;
    margin: 0 0 25px 0;
    color: #333;
    text-align: center;
}

.share-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.share-btn .share-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.share-whatsapp {
    background: linear-gradient(135deg, #25d366, #20b954);
}

.share-email {
    background: linear-gradient(135deg, #ea4335, #d33b2c);
}

.share-copy {
    background: linear-gradient(135deg, #6c757d, #5a6268);
}

.share-facebook {
    background: linear-gradient(135deg, #1877f2, #166fe5);
}

.share-twitter {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

/* Copy Link Success Message */
.copy-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.copy-success.show {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .share-buttons-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        min-width: 200px;
        justify-content: center;
    }
    
    .firma-share-section {
        padding: 25px;
    }
}

/* Responsive Design for Single Page */
@media (max-width: 768px) {
    .firma-title {
        font-size: 2rem;
    }
    
    .firma-header {
        padding: 25px;
    }
    
    .firma-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .firma-header-logo {
        align-self: center;
        width: 150px;
        height: 150px;
    }
    
    .contact-buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .firma-content {
        padding: 25px;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .firma-header {
        padding: 20px;
    }
    
    .firma-content {
        padding: 20px;
    }
    
    .contact-btn {
        padding: 15px;
    }
    
    .contact-btn .btn-text strong {
        font-size: 14px;
    }
    
    .contact-btn .btn-text small {
        font-size: 12px;
    }
    
    .firma-header-logo {
        width: 120px;
        height: 120px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .firma-card-horizontal,
    .firma-view-details-btn,
    .contact-btn,
    .gallery-item {
        transition: none;
    }
    
    .firma-card-horizontal:hover,
    .contact-btn:hover,
    .gallery-item:hover {
        transform: none;
    }
    
    @keyframes firma-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(0deg); }
    }
}
