/* Bramman Family Tree Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --border-color: #bdc3c7;
    --success-color: #27ae60;
    --warning-color: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header and Navigation */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.nav-menu a:hover {
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-menu a.active {
    color: var(--accent-color);
    font-weight: 700;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-toggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    font-weight: 300;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* People Grid */
.recent-people {
    padding: 3rem 0;
    background: white;
}

.recent-people h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.person-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.person-photo {
    text-align: center;
    margin-bottom: 1rem;
}

.person-photo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--border-color);
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto;
}

.person-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.person-info h3 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.person-info h3 a:hover {
    color: var(--accent-color);
}

.person-dates {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.person-places {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

/* Buttons */
.action-buttons {
    text-align: center;
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    margin: 0 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid;
    cursor: pointer;
    position: relative;
}

.btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: var(--accent-color);
    color: white;
}

/* Focus indicators for all interactive elements */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: row;
        position: relative;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 1rem 20px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateX(10px);
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .people-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .btn {
        display: block;
        margin: 0.5rem auto;
        text-align: center;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .recent-people {
        padding: 2rem 0;
    }
}