/* CSS Custom Properties - Clean, Consistent Color Palette */
:root {
    /* Primary Brand Color - Consumer-Friendly Blue */
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    
    /* Neutral Colors - Clean & Professional */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Complementary Colors */
    --complement: #8e91e0;
    --complement-light: #8b5cf6;
    --complement-dark: #4f46e5;
    
    /* Background Colors */
    --bg-primary: var(--white);
    --bg-secondary: var(--gray-50);
    --bg-tertiary: var(--gray-100);
    --bg-dark: var(--gray-800);
    --bg-darker: var(--gray-900);
    
    /* Text Colors */
    --text-primary: var(--gray-900);
    --text-secondary: var(--gray-600);
    --text-tertiary: var(--gray-500);
    --text-inverse: var(--white);
    
    /* Border Colors */
    --border-light: var(--gray-200);
    --border-medium: var(--gray-300);
    --border-dark: var(--gray-400);
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2rem);
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.logo:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transform: translateY(-1px);
}

.logo i {
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.logo:hover i {
    color: rgba(255, 255, 255, 0.9);
    transform: scale(1.05);
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-300);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    transform: translateY(-1px);
}

.nav-link i {
    font-size: 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.05);
}


/* Global Search Box */
.global-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.global-search:focus-within {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.global-search input {
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    outline: none;
    width: 220px;
    padding: 0.25rem 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.global-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.global-search button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-search button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    color: white;
}

.global-search i {
    font-size: 1.1rem;
}


/* Contact Page */
.contact-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.contact-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.contact-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form-container {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-form label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
}

.captcha-question {
    font-weight: 600;
    color: var(--text-primary);
}

.captcha-container input {
    width: 80px;
    text-align: center;
    font-weight: 600;
}

.contact-form .form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer-section h4 {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search */
.search-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-form {
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
}

/* Stats Section */
.stats-section {
    background: var(--bg-secondary);
    padding: 2rem 0;
    margin-top: -1rem;
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-align: center;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--text-inverse);
    font-size: 1.25rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-content p {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Main Content */
.main {
    padding: 2rem 0;
}

/* Pagination Info */
.pagination-info {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    text-align: center;
    border: 1px solid var(--border-light);
}

.pagination-info p {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.surnames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.surname-card {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.surname-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.75rem 0.75rem 0 0;
}

.surname-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.surname-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.surname-subtitle {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
    padding: 1.5rem;
}

.surname-info {
    margin-bottom: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.info-item i {
    color: var(--primary);
    width: 1rem;
}

/* Comments Preview */
.comments-preview h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.comments-list {
    /* No height restriction - use full space */
}

.comment-item {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--primary);
}

.comment-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.comment-content p {
    margin: 0;
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
    line-height: 1.6;
    position: relative;
}

.comment-content p::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--bg-primary);
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.no-comments {
    text-align: center;
    padding: 2rem;
    color: var(--text-tertiary);
}

.no-comments i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--text-inverse);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Buttons inside clickable cards should not be clickable */
.surname-card .btn-primary {
    pointer-events: none;
}

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

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.pagination-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pagination-numbers {
    display: flex;
    gap: 0.25rem;
}

.pagination-number {
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.pagination-number:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.pagination-number.active {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.pagination-ellipsis {
    padding: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Details Page */
.surname-detail-page {
    max-width: 900px;
    margin: 0 auto;
}

/* Surname Header */
.surname-header {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
}

.surname-header-content {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.surname-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.surname-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.meta-item i {
    color: var(--primary);
    font-size: 1rem;
    width: 1rem;
    text-align: center;
}

/* Comments Section */
.comments-section {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.comments-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.comment-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.comment-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

/* Alternating comment card styles */
.comment-card:nth-child(odd) {
    background: var(--bg-primary);
    border-left-color: var(--primary);
    border: 1px solid var(--border-light);
}

.comment-card:nth-child(even) {
    background: var(--bg-secondary);
    border-left-color: var(--primary-light);
    border: 1px solid var(--border-medium);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    padding: 1rem 1.5rem;
    background: var(--primary-50);
    border-radius: 0.75rem 0.75rem 0 0;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--primary-200);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.comment-author i {
    color: var(--primary);
    font-size: 1.1rem;
}

.comment-date {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 500;
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    padding: 0;
    margin-top: 0.5rem;
}

/* No Comments State */
.no-comments {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-comments i {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.no-comments h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-comments p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Search Info */
.search-info {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-info strong {
    color: var(--primary);
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-tertiary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}


/* Breadcrumb Styles */
.breadcrumb {
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    background: var(--primary-50);
    text-decoration: none;
    transform: translateY(-1px);
}

.breadcrumb span:not(.separator) {
    color: var(--text-primary);
    font-weight: 600;
}

.breadcrumb .separator {
    color: var(--gray-400);
    margin: 0 0.25rem;
    font-weight: 600;
}

/* Comment Form Styles */
.comment-form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-style: italic;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: right;
}

.captcha-group {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.captcha-question {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.captcha-container input {
    width: 80px;
    text-align: center;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0.5rem;
    border: 1px solid var(--border-medium);
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--text-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.error-messages {
    margin-bottom: 1.5rem;
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #fef2f2;
    color: var(--error);
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.success-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Top 5 Surnames Section */
.top-surnames-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-header h2 i {
    color: #f59e0b;
    font-size: 1.75rem;
}

.section-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin: 0;
}

.top-surnames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.top-surname-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
}

.top-surname-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 3rem 1rem 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.top-contributor-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 3rem 1rem 1rem;
    border-radius: 0.75rem 0.75rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.top-surname-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.rank-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.rank-badge .rank-number {
    line-height: 1;
}

.top-surname-card .card-content {
    padding: 1rem 3rem 1rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.top-surname-card .surname-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.top-contributor-card .contributor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.comment-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.comment-count,
.latest-activity {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: #64748b;
}

.comment-count i {
    color: var(--complement);
}

/* Comment icons in surname cards */
.info-item i.fas.fa-comments {
    color: var(--complement);
}

/* Comment icons in card badges */
.card-badge i.fas.fa-comments {
    color: var(--complement);
}

/* Comment icons in stat cards */
.stat-icon i.fas.fa-comments {
    color: var(--complement);
}

/* Comment icons in meta items */
.meta-item i.fas.fa-comments {
    color: var(--complement);
}

.latest-activity i {
    color: #10b981;
}

.top-surname-card .card-footer {
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.top-surname-card .btn-primary {
    width: 100%;
    justify-content: center;
    margin: 0;
}

/* Special styling for top 3 */
.top-surname-card[data-rank="1"] .rank-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-color: #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.top-surname-card[data-rank="2"] .rank-badge {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #6b7280;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.top-surname-card[data-rank="3"] .rank-badge {
    background: linear-gradient(135deg, #fef7ed, #fed7aa);
    color: #c2410c;
    border-color: #fb923c;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.2);
}

/* Top 5 Contributors Section */
.top-contributors-section {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 3rem 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.top-contributors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.top-contributor-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.top-contributor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.top-contributor-card .card-content {
    padding: 1rem 3rem 1rem 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.contributor-info {
    margin-bottom: 1rem;
}

.contributor-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}

.contributor-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.contributor-stats .surname-count,
.contributor-stats .latest-activity {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: #64748b;
}

.contributor-stats .surname-count i {
    color: #3b82f6;
}

.contributor-stats .latest-activity i {
    color: #10b981;
}

/* Special styling for top 3 contributors */
.top-contributor-card[data-rank="1"] .rank-badge {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border-color: #f59e0b;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.top-contributor-card[data-rank="2"] .rank-badge {
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #6b7280;
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.top-contributor-card[data-rank="3"] .rank-badge {
    background: linear-gradient(135deg, #fef7ed, #fed7aa);
    color: #c2410c;
    border-color: #fb923c;
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .stat-card {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .stat-icon {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .stat-content p {
        font-size: 0.875rem;
    }
    
    .surnames-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .surname-header {
        margin-bottom: 1.5rem;
    }
    
    .surname-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .surname-title {
        font-size: 1.75rem;
        text-align: left;
        width: 100%;
    }
    
    .surname-meta {
        gap: 1rem;
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
    
    .meta-item {
        font-size: 0.8rem;
        gap: 0.375rem;
    }
    
    .meta-item i {
        font-size: 0.9rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .comment-form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .comments-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .top-surnames-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.5rem 0;
        overflow-x: visible;
    }
    
    .top-surname-card {
        min-width: auto;
        flex-shrink: 1;
    }
    
    .top-surname-card .card-header {
        padding: 1rem 3rem 1rem 1rem;
    }
    
    .top-surname-card .surname-name {
        font-size: 1rem;
    }
    
    .top-contributors-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0.5rem 0;
        overflow-x: visible;
    }
    
    .top-contributor-card {
        min-width: auto;
        flex-shrink: 1;
    }
    
    .top-contributor-card .card-header {
        padding: 1rem 3rem 1rem 1rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .logo h1 {
        font-size: 1.25rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .global-search {
        width: 100%;
        max-width: 300px;
        margin: 0.5rem 0;
    }
    
    .global-search input {
        width: 100%;
        font-size: 0.9rem;
    }
    
    .top-surname-card .card-content {
        padding: 1rem;
    }
    
    .rank-badge {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    .stats-section {
        padding: 1rem 0;
    }
    
    .stats-grid {
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        margin: 0 0.25rem;
    }
    
    .stat-icon {
        width: 2rem;
        height: 2rem;
    }
    
    .stat-content h3 {
        font-size: 1.25rem;
    }
    
    .stat-content p {
        font-size: 0.8rem;
    }
    
    .stat-trend {
        font-size: 0.75rem;
    }
    
    /* Details page facecard for small phones */
    .surname-header {
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    .surname-header-content {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .surname-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .surname-meta {
        gap: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-item {
        font-size: 0.75rem;
        gap: 0.25rem;
        padding: 0.25rem 0;
    }
    
    .meta-item i {
        font-size: 0.8rem;
        width: 0.8rem;
    }
    
    /* Top 5 sections for small phones */
    .top-surnames-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .top-surname-card {
        min-width: auto;
    }
    
    .top-surname-card .card-header {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    }
    
    .top-surname-card .surname-name {
        font-size: 0.875rem;
        line-height: 1.2;
    }
    
    .comment-stats {
        gap: 0.25rem;
    }
    
    .comment-count,
    .latest-activity {
        font-size: 0.7rem;
        gap: 0.25rem;
    }
    
    .top-contributors-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.5rem 0;
    }
    
    .top-contributor-card {
        min-width: auto;
    }
    
    .top-contributor-card .card-header {
        padding: 0.75rem 2.5rem 0.75rem 0.75rem;
    }
    
    .contributor-name {
        font-size: 0.875rem;
        line-height: 1.2;
    }
    
    .contributor-stats {
        gap: 0.25rem;
    }
    
    .surname-count,
    .latest-contribution {
        font-size: 0.7rem;
        gap: 0.25rem;
    }
    
    .rank-badge {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.75rem;
        top: 0.5rem;
        right: 0.5rem;
    }
}