body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #f9f5f0; /* Light tan background */
}

/* Global link styling */
a {
    color: #8b4513; /* Brown color matching headings for regular page links */
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #a52a2a; /* Dark red on hover, matching nav hover */
    text-decoration: underline;
}

/* Links on dark backgrounds (like header and footer) */
.header a, .footer a, .contact a {
    color: #f9d7b5; /* Light peachy color for dark backgrounds */
}

.header a:hover, .footer a:hover, .contact a:hover {
    color: #f9f5f0; /* Light tan color on hover */
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Copperplate", "Copperplate Gothic Light", serif;
    color: #8b4513; /* Brown color for headings */
}

.generation-note {
    color: #85776e;
    font-size: x-small;

}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0px 20px 20px 20px; /* Reduced right margin from 20px to 10px */
    padding: 20px 20px 20px 20px; /* Also reduced right padding from 20px to 10px */
    box-sizing: border-box;
}

.header {
    background: url('img/wood3.png') repeat;
    padding-top: 20px;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
}

.header .container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.fas {
    margin-right: 8px;
    /* font-size: 1.1em; */
}

/* Mobile styles for header (works in all mobile browsers) */
@media screen and (max-width: 768px) {
    .header .container {
        flex-direction: column !important; /* Force column layout */
        flex-wrap: wrap; /* Allow wrapping */
        align-items: center;
        width: auto; /* Ensure full width */
    }
    
    .logo-container {
        width: 90%; /* Full width container */
        margin-bottom: 10px;
        text-align: center;
    }
    
    .header-text {
        width: auto; /* Full width container */
        padding: 10px; /* Add some padding */
    }
}

.logo-container {
    text-align: center;
    margin-bottom: 15px;
}

.header-text {
    color: #fff;
    text-align: center;
    font-size: 18px;
    line-height: 1.6;
}

.logo {
    max-width: 90%;
    height: auto;
    padding: 10px;
    border-radius: 8px;
}

/* Increase the size of team member names */
.team-member h4 {
    font-size: 22px; /* Make names larger */
    margin-bottom: 5px; /* Reduce space between name and role */
}

/* Style for roles (already suggested in previous response) */
.team-member .role {
    font-style: italic;
    font-weight: 400;
    color: #000000; 
    font-size: 16px; /* Explicitly set role font size smaller than names */
    margin-top: -5px; /* Optional: tightens spacing between name and role */
}
/* Add this new rule to override text alignment for bio paragraphs */
.team-member p:not(.role) {
    text-align: left;
}

.nav {
    display: flex;
    justify-content: center;
    background-color: #8b4513; /* Brown navigation */
    padding: 10px 0;
}

.nav a {
    color: #f9f5f0; /* Light tan color for links */
    text-decoration: none;
    padding: 10px 15px; /* Increased padding */
    font-family: "Copperplate", "Copperplate Gothic Light", serif;
    font-size: 20px; 
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: #a52a2a; /* Dark red on hover */
    text-decoration: none; /* No underline on nav links */
}

/* Content wrapper to ensure consistent width */
.content-wrapper {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.welcome {
    padding: 50px 0;
}

.welcome-content {
    display: flex;
    margin-bottom: 30px;
}

.welcome-image {
    flex: 0 0 33%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.welcome-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.welcome-text {
    flex: 0 0 67%;
    text-align: left;
    padding-left: 20px;
    padding-right: 30px;
}

/* YouTube Container Styling */
.youtube-container {
    width: calc(100% - 40px); /* Subtract the total padding (left+right) */
    margin: 30px auto;
    max-width: 800px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Make YouTube videos responsive while maintaining aspect ratio */
.youtube-container iframe {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 6px 12px rgba(139, 69, 19, 0.2);
    border: 3px solid #f9f5f0;
}

.services {
    padding: 30px 0;
    background-color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Shows exactly 4 columns */
    gap: 30px;
    margin-top: 20px;
}

/* Add this for responsiveness */
@media screen and (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on medium screens */
    }
}

@media screen and (max-width: 900px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
    }
}

@media screen and (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

.service-item {
    background-color: #f9f5f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.service-image {
    width: 100%;
    padding-top: 40.08%; /* 99/247 = 0.4008 or 40.08% */
    position: relative;
    overflow: hidden;
}

.service-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.service-item:hover .service-image img {
    transform: scale(1.05);
}

.service-text {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.service-text h3 {
    margin-top: 0;
    color: #8b4513;
    border-bottom: 2px solid #a52a2a;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 16px;
}

.team {
    padding: 50px 0;
}

.team-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.team-member {
    flex: 0 0 calc(33.333% - 30px);
    min-width: 250px;
    text-align: center;
    margin-bottom: 30px;
}

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.gallery {
    padding: 50px 0;
    background-color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    transition: opacity 0.3s;
}

.modal-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 80%;
    margin: auto;
}

#modalImage {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.modal-caption {
    color: #f9f5f0;
    padding: 20px;
    text-align: center;
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.5;
}

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #a52a2a;
    text-decoration: none;
}

.modal-nav {
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    padding: 15px;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: rgba(139, 69, 19, 0.7);
    z-index: 1001;
}

.modal-nav:hover {
    background-color: rgba(165, 42, 42, 0.9);
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.contact {
    padding: 50px 0;
    background-color: #8b4513; /* Brown background */
    color: #fff;
}

.contact h2 {
    color: #fff;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.contact-info div {
    flex: 1 0 250px;
}

.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .nav {
        flex-direction: column;
        align-items: center;
    }
    
    .welcome-content {
        flex-direction: column;
        align-items: center;
    }
    
    .welcome-image {
        flex: 0 0 100%;
        margin-bottom: 20px;
        padding: 0;
    }
    
    .welcome-image img {
        max-width: 250px;
    }
    
    .welcome-text {
        flex: 0 0 100%;
        padding-left: 0;
        text-align: left;
    }
    
    .service-item {
        flex-direction: column;
    }
    
    .team-member {
        flex: 0 0 100%;
    }
}