/*
Theme Name: SiteReviews Каталог
Theme URI: 
Author: You
Description: Тема для каталога сайтов с ACF
Version: 2.0
*/

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== TYPOGRAPHY ========== */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 1.5rem 0 1rem;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

/* ========== HEADER ========== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.site-title {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    transition: opacity 0.3s;
}

.site-title:hover {
    opacity: 0.8;
}

header p {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ========== NAVIGATION ========== */
.main-nav {
    margin-top: 0.5rem;
}

.main-nav a {
    color: #555;
    text-decoration: none;
    margin-right: 1.5rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

/* ========== CARD GRID ========== */
.site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin: 2rem 0;
}

/* ========== SITE CARD ========== */
.site-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.site-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.site-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.site-card:hover::before {
    transform: scaleX(1);
}

.site-card-content {
    padding: 1.5rem;
}

.site-title-card {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.site-title-card a {
    text-decoration: none;
    color: #1a1a2e;
    transition: color 0.2s;
}

.site-title-card a:hover {
    color: #667eea;
}

/* ========== BADGES ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.badge-premium {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #1a1a2e;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.badge-free {
    background: #e9ecef;
    color: #6c757d;
}

/* ========== METRICS ========== */
.site-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1rem 0;
    font-size: 0.8rem;
    color: #6c757d;
}

.site-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.site-url {
    font-size: 0.8rem;
    color: #adb5bd;
    word-break: break-all;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0.5rem 0;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: #fff;
}

/* ========== HERO SECTION ========== */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 24px;
    color: #fff;
    margin-bottom: 3rem;
}

.hero h1 {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: #fff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ========== FILTERS & SORTING ========== */
.filters-bar {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sort-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sort-links a {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    background: #f8f9fa;
    color: #6c757d;
}

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

/* ========== NICHE TAGS ========== */
.niche-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 1.5rem 0;
}

.niche-tag {
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 30px;
    text-decoration: none;
    color: #495057;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid #e9ecef;
}

.niche-tag:hover,
.niche-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* ========== SINGLE SITE PAGE ========== */
.site-article {
    background: #fff;
    border-radius: 24px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.metrics-table {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

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

.metrics-table td {
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.metrics-table td:first-child {
    font-weight: 600;
    width: 40%;
    color: #495057;
}

.metrics-table tr:last-child td {
    border-bottom: none;
}

.premium-offer {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: none;
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
}

/* ========== PAGINATION ========== */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    background: #fff;
    transition: all 0.2s;
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.pagination .page-numbers:hover:not(.current) {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* ========== FORMS ========== */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    background: #fff;
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1a1a2e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========== ALERTS ========== */
.alert-success {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #1a5c2e;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: linear-gradient(135deg, #fda4a4 0%, #f87171 100%);
    color: #7f1d1d;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* ========== FOOTER ========== */
footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #adb5bd;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    margin: 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .site-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .metrics-table td {
        display: block;
        width: 100%;
    }
    
    .metrics-table td:first-child {
        padding-bottom: 0;
    }
    
    .site-article {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .site-title-card {
        font-size: 1rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card {
    animation: fadeInUp 0.4s ease-out;
}

/* ========== BREADCRUMBS ========== */
.breadcrumbs {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #667eea;
}

/* ========== SEARCH FORM ========== */
.search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 1rem auto;
}

.search-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 40px;
    font-size: 1rem;
}

.search-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 0 24px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-form button:hover {
    transform: scale(1.02);
}

/* ========== LOADING SKELETON ========== */
.skeleton-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========== TOOLTIPS ========== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #1a1a2e;
    color: #fff;
    font-size: 0.7rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

[data-tooltip]:hover:before {
    opacity: 1;
}