/**
 * Frontend styles for Ipartelep Kiadó Egységek plugin
 * Modern, clean, responsive list layout
 */

/* ===== Archive / List View ===== */
.ike-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ike-archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.ike-archive-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1a1a1a;
}

/* Category Filter - Classic Button Style */
.ike-category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 25px 0;
}

.ike-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.ike-filter-btn:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #111;
}

.ike-filter-btn.active {
    background: #770000;
    border-color: #5a0000;
    color: #ffffff;
}

.ike-filter-btn.active:hover {
    background: #5a0000;
}

.ike-filter-btn .btn-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.ike-filter-btn.active .btn-count {
    background: rgba(255,255,255,0.25);
}

.ike-archive-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 15px auto 0;
}

/* Units List */
.ike-units-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.ike-unit-item {
    display: flex;
    gap: 25px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ike-unit-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.ike-unit-thumbnail {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
}

.ike-unit-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.ike-unit-thumbnail .ike-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 6px;
    text-decoration: none;
}

.ike-placeholder-icon {
    font-size: 3rem;
}

.ike-unit-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ike-unit-title {
    margin: 0 0 12px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.ike-unit-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ike-unit-title a:hover {
    color: #c31b24;
}

.ike-unit-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ike-category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #555;
    text-decoration: none;
    transition: background 0.2s ease;
}

.ike-category-tag:hover {
    background: #e0e0e0;
}

.ike-unit-excerpt {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.ike-unit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.ike-meta-item {
    font-size: 0.95rem;
    color: #666;
}

.ike-meta-item.ike-price strong {
    color: #c31b24;
    font-size: 1.1rem;
}

.ike-location-label {
    font-weight: 600;
    margin-right: 5px;
}

.ike-view-details {
    align-self: flex-start;
    color: #c31b24;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ike-view-details:hover {
    color: #770000;
}

/* No Results */
.ike-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

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

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

.ike-pagination a,
.ike-pagination .current {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    text-decoration: none;
    color: #555;
    transition: all 0.2s ease;
}

.ike-pagination a:hover,
.ike-pagination .current {
    background: #770000;
    color: #fff;
    border-color: #770000;
}

/* ===== Category Selector (Shortcode) ===== */
.ike-category-selector {
    text-align: center;
    padding: 40px 20px;
}

.ike-selector-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.ike-category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.ike-category-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: #fff;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ike-category-button:hover {
    background: #770000;
    color: #fff;
    border-color: #770000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(119, 0, 0, 0.2);
}

.ike-category-button .category-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ike-category-button:hover .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== Single Unit View ===== */
.ike-single-unit {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ike-notice {
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 6px;
    font-weight: 500;
}

.ike-notice-inactive {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.ike-single-header {
    margin-bottom: 30px;
}

.ike-single-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.ike-single-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ike-single-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 900px) {
    .ike-single-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Media Section */
.ike-single-media {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ike-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ike-gallery-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.ike-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.ike-gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

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

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

/* Main Content Section */
.ike-single-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ike-description h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.ike-details-box,
.ike-contact-box {
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.ike-details-box h3,
.ike-contact-box h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.ike-details-table {
    width: 100%;
    border-collapse: collapse;
}

.ike-details-table th,
.ike-details-table td {
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.ike-details-table th {
    font-weight: 600;
    color: #555;
    width: 40%;
}

.ike-details-table td {
    color: #333;
}

.ike-details-table tbody tr:last-child th,
.ike-details-table tbody tr:last-child td {
    border-bottom: none;
}

.ike-contact-item {
    margin-bottom: 12px;
}

.ike-contact-item:last-child {
    margin-bottom: 0;
}

.ike-contact-item a {
    color: #c31b24;
    text-decoration: none;
}

.ike-contact-item a:hover {
    text-decoration: underline;
}

.ike-back-link {
    margin-top: 20px;
}

.ike-button-secondary {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #770000;
    border-radius: 6px;
    color: #770000;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.ike-button-secondary:hover {
    background: #770000;
    color: #fff;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .ike-archive-title,
    .ike-single-title {
        font-size: 2rem;
    }
    
    /* Category filter mobile */
    .ike-category-filter {
        gap: 8px;
    }
    
    .ike-filter-chip {
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    
    .ike-filter-chip .chip-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.75rem;
        padding: 0 6px;
    }
    
    .ike-unit-item {
        flex-direction: column;
    }
    
    .ike-unit-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .ike-unit-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .ike-category-button {
        width: 100%;
        justify-content: space-between;
    }
    
    .ike-single-content {
        grid-template-columns: 1fr;
    }
}

/* ===== Advanced Filters ===== */
.ike-advanced-filters {
    margin: 20px 0 10px;
    padding: 20px 25px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.ike-filter-form {}

.ike-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.ike-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.ike-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.ike-filter-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ike-filter-range input {
    width: 80px;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.ike-filter-range span {
    color: #999;
    font-weight: 600;
}

.ike-filter-group select {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
}

.ike-filter-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ike-filter-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    color: #333;
    cursor: pointer;
}

.ike-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 2px;
}

.ike-filter-submit {
    padding: 9px 22px;
    background: #770000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.ike-filter-submit:hover {
    background: #5a0000;
}

.ike-filter-reset {
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
}

.ike-filter-reset:hover {
    color: #333;
    text-decoration: underline;
}

/* ===== Grid View (All units) ===== */
.ike-units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 10px;
}

@media (max-width: 1024px) {
    .ike-units-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ike-units-grid {
        grid-template-columns: 1fr;
    }
}

.ike-unit-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ike-unit-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-color: #d0d0d0;
    transform: translateY(-2px);
}

.ike-unit-card-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.ike-unit-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.ike-unit-card:hover .ike-unit-card-thumb img {
    transform: scale(1.04);
}

.ike-unit-card-thumb .ike-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.ike-unit-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.ike-unit-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
}

.ike-unit-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.ike-unit-card-title a:hover {
    color: #c31b24;
}

.ike-unit-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ike-spec {
    display: inline-block;
    padding: 3px 10px;
    background: #f0f4fa;
    border-radius: 4px;
    font-size: 0.82rem;
    color: #444;
}

.ike-unit-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #c31b24;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

/* ===== List View (Category view) ===== */
.ike-units-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 10px;
}

/* ===== Responsive filter fixes ===== */
@media (max-width: 768px) {
    .ike-filter-row {
        flex-direction: column;
        gap: 14px;
    }
    .ike-filter-group {
        min-width: 0;
        width: 100%;
    }
    .ike-filter-range input {
        flex: 1;
        width: auto;
    }
    .ike-filter-btn {
        font-size: 0.9rem;
        padding: 8px 14px;
    }
    .ike-filter-btn .btn-count {
        min-width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
}

/* ===== Contact person block ===== */
.ike-contact-person {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.ike-contact-photo {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    flex-shrink: 0;
}

.ike-contact-person-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ike-contact-person-info strong {
    font-size: 1rem;
    color: #1a1a1a;
}

.ike-contact-title {
    font-size: 0.85rem;
    color: #888;
}

/* =========================================================
   Megközelítés + Térkép szekció
   ========================================================= */
.ike-location-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.ike-location-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.ike-transport-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.ike-map-wrap {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ike-map-wrap iframe {
    width: 100%;
    height: 380px;
    border: 0;
    display: block;
}

@media (max-width: 600px) {
    .ike-map-wrap iframe {
        height: 260px;
    }
}

/* =========================================================
   Belső SEO link sáv
   ========================================================= */
.ike-seo-links {
    margin-top: 40px;
    padding: 16px 20px;
    background: #f5f7fa;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    font-size: 0.88rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 4px;
}

.ike-seo-link {
    color: #c31b24;
    text-decoration: none;
    white-space: nowrap;
}

.ike-seo-link:hover {
    text-decoration: underline;
    color: #004999;
}

.ike-seo-sep {
    color: #bbb;
    padding: 0 4px;
}

/* =========================================================
   Kiemelt kép lightbox link
   ========================================================= */
.ike-featured-link {
    display: block;
    position: relative;
    cursor: zoom-in;
}

.ike-featured-link img {
    display: block;
    width: 100%;
    height: auto;
}

.ike-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.ike-featured-link:hover .ike-zoom-hint {
    opacity: 1;
}
