/* General Page Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: beige;
    color: black;
    line-height: 1.6;
}

/* Header */
header {
    background-color: brown;
    color: white;
    text-align: center;
    padding: 25px 15px;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Main Page Layout */
.page-layout {
    width: 100%;
    margin: 0;
    padding: 20px 40px 20px 0;
    box-sizing: border-box;
}

/* Left Sidebar */
.side-nav {
    background-color: tan;
    padding: 20px;
    box-sizing: border-box;
    position: fixed;
    top: 152px;
    left: 0;
    bottom: 0;
    width: 360px;
    overflow-y: auto;
}

.side-nav h2 {
    color: brown;
    margin-top: 0;
}

.side-nav p {
    margin-bottom: 20px;
}

/* Navigation */
nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

nav li {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

nav a {
    text-decoration: none;
    color: black;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
    color: brown;
}

/* Content Area */
.content-area {
    width: 1100px;
    margin-left: 500px;
    margin-right: auto;
}

/* Grid Layout */
.family-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    align-items: start;
}

/* Profile Card */
.profile-card {
    background-color: white;
    border: 1px solid tan;
    border-radius: 12px;
    padding: 24px;
    transition: 0.3s;
    align-self: start;
    overflow: hidden;
}

/* Active card */
.active-card {
    border: 3px solid blue;
    background-color: lightyellow;
}

/* Full clickable header button */
.card-toggle {
    display: block;
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
}

/* Top section */
.profile-top {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

/* Circle initials */
.profile-photo {
    width: 60px;
    height: 60px;
    background-color: brown;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    font-size: 1.2rem;
}

/* Name */
.profile-heading h3 {
    margin: 0;
    color: brown;
    font-size: 2rem;
}

/* Content hidden by default */
.card-content {
    display: none;
}

/* Show content when active */
.active-card .card-content {
    display: block;
}

/* Details */
.profile-details {
    margin-top: 10px;
}

.profile-details p {
    margin: 8px 0;
    font-size: 1.3rem;
}

/* Links */
.profile-link {
    margin-top: 15px;
}

.profile-link a {
    color: blue;
}

.profile-link a:hover {
    color: brown;
}

a {
    color: blue;
}

a:hover {
    color: brown;
}

/* Tablet */
@media (max-width: 1400px) {
    .content-area {
        width: auto;
        margin-left: 390px;
        margin-right: 20px;
    }
}

/* Mobile */
@media (max-width: 900px) {
    .side-nav {
        position: static;
        width: auto;
        top: auto;
        bottom: auto;
        margin-bottom: 20px;
    }

    .content-area {
        width: auto;
        margin-left: 0;
        margin-right: 0;
    }

    .page-layout {
        padding: 20px;
    }

    .family-grid {
        grid-template-columns: 1fr;
    }
}