/**
 * BAROTHY CSALÁDFA - STÍLUSLAP
 */

/* ===== ALAPBEÁLLÍTÁSOK ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #764ba2;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --white: #ffffff;
    --border: #dee2e6;
    --text: #333333;
    --text-light: #6c757d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #f5f5f5;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    flex-wrap: nowrap;
    gap: 15px;
}

.logo a {
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3em;
    font-weight: bold;
    white-space: nowrap;
}

.logo-icon {
    font-size: 1.5em;
}

.main-nav {
    overflow: hidden;
    max-height: 500px;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
    opacity: 1;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 3px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-size: 0.95em;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.2);
}

/* ===== LANGUAGE SWITCHER =====*/
.lang-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 15px;
}

.lang-flag {
    font-size: 0.9em;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    opacity: 0.5;
    transition: all 0.3s;
    display: inline-block;
    padding: 6px 10px;
    border-radius: 4px;
    background: rgba(255,255,255,0.1);
    color: white;
    letter-spacing: 0.5px;
}

.lang-flag:hover {
    opacity: 0.9;
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

.lang-flag.active {
    opacity: 1;
    background: rgba(255,255,255,0.25);
    cursor: default;
    font-weight: 700;
}

.mobile-menu-toggle {
    display: none !important;
    font-size: 1.5em;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    color: white;
}

/* ===== MAIN CONTENT ===== */
main {
    min-height: calc(100vh - 400px);
    padding: 40px 20px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    color: var(--dark);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
    margin-top: 30px;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-dark);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    background: var(--light);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb li::after {
    content: '→';
    margin-left: 10px;
    color: var(--text-light);
}

.breadcrumb li:last-child::after {
    content: '';
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

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

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: #5a6268;
    color: var(--white);
}

.btn-danger {
    background: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
    color: var(--white);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

textarea.form-control {
    resize: vertical;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-note {
    margin-top: 10px;
    color: var(--text-light);
}

small {
    display: block;
    margin-top: 5px;
    color: var(--text-light);
    font-size: 0.9em;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--info);
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--white);
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hero h1 {
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.lead {
    font-size: 1.2em;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 3em;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    opacity: 0.9;
    font-size: 1.1em;
}

/* ===== FEATURES ===== */
.features {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

.feature-card {
    padding: 30px;
    background: var(--light);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin: 15px 0;
    color: var(--primary-dark);
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ===== SEARCH & RESULTS ===== */
.search-box,
.search-form {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.result-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.result-header h3 {
    margin: 0;
}

.result-header h3 a {
    color: var(--primary);
    text-decoration: none;
}

.gender-badge {
    font-size: 1.5em;
}

.result-meta {
    color: var(--text-light);
    font-size: 0.9em;
    margin: 10px 0;
}

.meta-item {
    display: block;
    margin: 5px 0;
}

.result-actions {
    margin-top: 15px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.no-results-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    color: var(--text-light);
}

/* ===== PERSON DETAIL ===== */
.person-detail {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.person-header {
    border-bottom: 3px solid var(--primary);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.person-subtitle {
    margin-top: 10px;
}

.generation-badge {
    background: var(--primary);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
}

.info-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--light);
    border-radius: 8px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    padding: 10px;
    background: var(--white);
    border-radius: 6px;
}

.family-links, .children-list {
    margin-top: 15px;
}

.family-member, .child-item {
    padding: 10px;
    background: var(--white);
    border-radius: 6px;
    margin: 10px 0;
}

.unknown {
    color: var(--text-light);
    font-style: italic;
}

/* ===== TABLE ===== */
.persons-table {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin: 20px 0;
}

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

thead {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

th, td {
    padding: 15px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

tbody tr:hover {
    background: var(--light);
}

.text-center {
    text-align: center;
}

.person-link {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.person-link:hover {
    text-decoration: underline;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 10px 15px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s;
}

.page-link:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: var(--white);
    padding: 40px 20px 20px;
    margin-top: 60px;
}

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

.footer-section h4 {
    color: var(--white);
    margin-bottom: 15px;
}

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

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: block;
    margin: 5px 0;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

.footer-bottom a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.back-link {
    color: var(--text-light);
    text-decoration: none;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-header {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.dashboard-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.action-card {
    background: var(--light);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
    position: relative;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    color: var(--text);
}

.action-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8em;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .main-nav {
        max-height: 0;
        opacity: 0;
        width: 100%;
        transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
    }
    
    .main-nav.mobile-open {
        max-height: 500px;
        opacity: 1;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav a {
        border-radius: 0;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid,
    .feature-grid,
    .quick-actions,
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2em;
    }
    
    h2 {
        font-size: 1.5em;
    }
}

/* ===== ADMIN SPECIFIC STYLES ===== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.admin-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.add-form {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.inline-form .form-group {
    margin-bottom: 15px;
}

.names-list {
    max-height: 500px;
    overflow-y: auto;
}

.name-item {
    padding: 15px;
    background: var(--light);
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid var(--primary);
}

.name-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.name-id {
    font-size: 0.85em;
    color: var(--text-light);
    background: var(--white);
    padding: 3px 8px;
    border-radius: 4px;
}

.name-note {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.9em;
}

.info-box {
    background: #e7f3ff;
    border-left: 4px solid var(--info);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.person-form {
    max-width: 800px;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    justify-content: center;
}

.stat-mini {
    background: var(--white);
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-mini.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.stat-mini strong {
    display: block;
    font-size: 2em;
    margin-bottom: 5px;
}

.stat-mini span {
    font-size: 0.9em;
    opacity: 0.8;
}

.filter-tabs {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    border-bottom: 2px solid var(--border);
}

.tab {
    padding: 12px 24px;
    text-decoration: none;
    color: var(--text);
    border-radius: 6px 6px 0 0;
    transition: all 0.3s;
}

.tab:hover {
    background: var(--light);
}

.tab.active {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.comments-admin-list {
    margin-top: 20px;
}

.comment-admin-item {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.comment-admin-item.new {
    border-left: 4px solid var(--warning);
    background: #fffbf0;
}

.comment-admin-item.processed {
    border-left: 4px solid var(--success);
    opacity: 0.8;
}

.comment-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.comment-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.comment-email {
    color: var(--text-light);
    font-size: 0.9em;
}

.comment-date,
.comment-ip {
    font-size: 0.85em;
    color: var(--text-light);
}

.comment-status {
    flex-shrink: 0;
}

.badge-success {
    background: var(--success);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-warning {
    background: var(--warning);
    color: var(--dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.comment-admin-content h4 {
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.comment-text {
    background: var(--light);
    padding: 15px;
    border-radius: 6px;
    line-height: 1.6;
}

.comment-admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

.page-actions {
    margin: 40px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ===== LISTA STÍLUSOK ===== */
.list-info {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.search-tips {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.search-tips ul {
    margin: 20px 0;
    padding-left: 25px;
}

.search-tips li {
    margin: 10px 0;
    line-height: 1.6;
}

.quick-links {
    margin-top: 30px;
    text-align: center;
}

.help-box {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.help-box ul {
    margin: 15px 0;
    padding-left: 25px;
}

.help-box li {
    margin: 8px 0;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.contact-details {
    margin-top: 15px;
}

.contact-details p {
    margin: 10px 0;
}

.about {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.about-content {
    margin-top: 20px;
}

.intro-text {
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

@media print {
    .site-header,
    .site-footer,
    .breadcrumb,
    .btn,
    .page-actions {
        display: none;
    }
}
