/* General Styles for About Us Page */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* Header Section for About Us Page */
.about-header {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #ff7e5f, #ff4d4d);
    color: white;
    position: relative;
    overflow: hidden;
}

.about-header h1 {
    font-size: 3rem;
    margin: 0;
    animation: fadeInDown 1s ease-in-out;
}

.about-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Team Photo Section */
.team-photo {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* About Us Content */
.about-content {
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #ff4d4d;
    animation: fadeInUp 1s ease-in-out;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #555;
}

/* Team Section */
.team-section {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f9f9f9, #fff);
    text-align: center;
}

.team-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ff4d4d;
    animation: fadeInUp 1s ease-in-out;
}

/* Modified Team Grid Layout */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* First two team members (top row) */
.team-member:nth-child(1),
.team-member:nth-child(2) {
    grid-column: span 1;
}

/* Last three team members (bottom row) */
.team-member:nth-child(3) {
    grid-column: 1 / 2;
    grid-row: 2;
}

.team-member:nth-child(4) {
    grid-column: 2 / 3;
    grid-row: 2;
}

.team-member:nth-child(5) {
    grid-column: 1 / 3;
    grid-row: 3;
    width: calc(50% - 1rem);
    justify-self: center;
    max-width: 220px;
}

/* Team Member Cards - Modified for Smaller Portrait/Vertical Layout */
.team-member {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 220px;
    margin: 0 auto;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.team-member img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    aspect-ratio: 3/4; /* Portrait aspect ratio */
}

.team-member h3 {
    font-size: 1.2rem;
    margin: 0.5rem 0 0.25rem;
    color: #333;
}

.team-member p {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 0.75rem;
}

/* Push social links to bottom of card */
.team-member .social-links {
    margin-top: auto;
    padding-top: 0.75rem;
}

.team-member .social-links a {
    color: #ff4d4d;
    margin: 0 0.3rem;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.team-member .social-links a:hover {
    color: #ff7e5f;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .team-member:nth-child(n) {
        grid-column: 1;
        grid-row: auto;
        width: 100%;
        max-width: 200px;
    }

    .team-member img {
        height: 220px;
    }
}

/* Footer Section */
footer {
    text-align: center;
    padding: 2rem;
    background: #333;
    color: white;
}

footer a {
    color: #ff4d4d;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #ff7e5f;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}