*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    position: relative;
}
.container {
    width: min(80%, 1400px);
    margin-inline: auto;
    padding: 20px;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: clip;
}

section {
    width: 100%;
    overflow-x: clip;
}

main {
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}
header {
    background: #ffffff;
    color: #333;
    padding: 20px 0;
    text-align: center;
    border-bottom: #506150 3px solid;
}

header #branding img {
    height: 300px;
    width: auto;
    max-width: 100%;
}
#showcase {
    min-height: 400px;
    text-align: center;
    color: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    content-visibility: auto;
    contain: layout style paint;
}

#showcase picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    #showcase {
        min-height: 350px;
    }
}

@media (max-width: 480px) {
    #showcase {
        min-height: 300px;
    }
}
#showcase h1 {
    font-size: 55px;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}
#showcase p {
    font-size: 20px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    background-color: rgba(80, 97, 80, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}
.services {
    margin-top: 40px;
    padding: 20px 0;
}

#about {
    padding: 60px 0;
    background: #fff;
}

#about h2, .service h3 {
    color: #506150;
    font-size: 3.5em;
    margin-bottom: 40px;
    font-family: 'Playfair Display', serif;
    text-align: center;
    position: relative;
    letter-spacing: -0.02em;
}

#about h2::before, .service h3::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #506150;
    margin: 0 auto 20px;
    opacity: 0.3;
}

#about h2::after, .service h3::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background: #506150;
    margin: 20px auto 0;
    opacity: 0.2;
}

.service h3 {
    margin-top: 20px;
}

#about p {
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.2em;
    line-height: 1.8;
    text-align: center;
    color: #333;
    opacity: 0.9;
}
.service {
    margin-bottom: 0;
    text-align: center;
    padding: 80px 0;
    position: relative;
}

.service:nth-child(odd) {
    background: #fff;
}

.service h3 {
    margin-bottom: 50px;
}

.service h3::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: #506150;
    margin: 0 auto 20px;
    opacity: 0.5;
}

.service p {
    font-size: 1.3em;
    line-height: 1.8;
    color: #333;
    max-width: 800px;
    margin: 0 auto 60px;
}

.service-images {
    margin-top: 60px;
    position: relative;
}

.service-images::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 40px;
    background: #506150;
    opacity: 0.3;
}

.service-images::after {
    content: '';
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #506150;
    opacity: 0.5;
}

.main-image {
    margin-bottom: 60px;
    padding: 0px;
}

.main-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.service-images {
    margin-top: 60px;
    position: relative;
    padding: 0 20px;
}

.main-image {
    margin-bottom: 60px;
    width: 100%;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 40px auto;
    width: 100%;
    position: relative;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.gallery-nav-btn {
    background: rgba(80, 97, 80, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    pointer-events: auto;
    z-index: 2;
}

.gallery-nav-btn:hover {
    background: rgba(80, 97, 80, 1);
}

.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    z-index: 1;
}

.modal-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    z-index: 1002;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    #about h2, .service h3 {
        font-size: 2.8em;
        margin-bottom: 30px;
    }

    #about h2::after, .service h3::after {
        width: 60px;
        margin: 15px auto 0;
    }

    .service h3::before {
        width: 30px;
        margin: 0 auto 15px;
    }

    #about {
        padding: 40px 0;
    }

    #about h2 {
        font-size: 2em;
    }

    .service {
        padding: 60px 0;
    }

    .service h3 {
        font-size: 2.8em;
    }

    .service h3::before {
        width: 30px;
        margin: 0 auto 15px;
    }

    .service h3::after {
        width: 80px;
        margin: 15px auto 0;
    }

    .service p {
        font-size: 1.1em;
        line-height: 1.6;
        margin-bottom: 50px;
        padding: 0 20px;
    }

    .service-images {
        margin-top: 60px;
        padding-top: 30px;
    }

    .service-images::before {
        height: 30px;
    }
    
    .service h3 {
        font-size: 2em;
    }
    
    .service p {
        font-size: 1.1em;
        margin-bottom: 30px;
    }
    
    .main-image img {
        height: 300px;
    }
    
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-image img {
        height: 250px;
    }
}
.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
    will-change: transform;
    contain: layout style paint;
}
.gallery-item img:hover,
.service-image:hover {
    transform: scale(1.05);
}
footer {
    padding: 30px 20px;
    margin-top: 20px;
    color: #ffffff;
    background-color: #506150;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 0;
}

.contact-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.contact-value,
.contact-link {
    color: white;
    text-decoration: none;
    padding: 5px 0;
    transition: opacity 0.3s ease;
}

.contact-link:hover,
.contact-value:hover {
    text-decoration: underline;
    opacity: 0.9;
}

.footer-nav {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-nav h4 {
    color: white;
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 500;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: inline-block;
}

.footer-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .contact-info {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }

    .contact-item {
        flex-direction: row;
        gap: 8px;
    }

    .contact-label {
        margin-bottom: 0;
    }

    .contact-label::after {
        content: " ";
    }

    .footer-nav ul {
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .footer-nav ul {
        flex-direction: column;
        gap: 12px;
    }
    
    .footer-nav a {
        display: block;
        text-align: center;
    }
}
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.1;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.modal-content.fading {
    transition: opacity 2s linear;
    opacity: 0.6;
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(80, 97, 80, 0.8);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 36px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 1001;
    padding-bottom: 10px;
}

.modal-nav:hover {
    background: rgba(80, 97, 80, 1);
}

.modal-nav.prev {
    left: 20px;
}

.modal-nav.next {
    right: 20px;
}

.modal-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    z-index: 1002;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 768px) {
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .modal-nav.prev {
        left: 10px;
    }

    .modal-nav.next {
        right: 10px;
    }
}
.close {
    position: fixed;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
}
.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        width: 90%;
    }
    .service-image {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    header #branding img {
        height: 250px;
    }
    .service-image {
        height: 300px;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    #showcase {
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 10px;
        margin: 0;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }

    .gallery {
        margin: 0;
        padding: 0 10px;
        width: auto;
    }

    .service {
        padding: 0 10px;
    }
    header {
        padding: 15px 0;
    }
    header #branding img {
        height: 180px;
    }
    .service {
        margin-bottom: 30px;
    }
    .service h3 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    .service p {
        font-size: 0.95em;
        line-height: 1.5;
    }
    .service-image {
        height: 250px;
        margin-bottom: 15px;
    }
    #showcase {
        min-height: 300px;
    }
}

@media (max-width: 576px) {
    header #branding img {
        height: 150px;
    }
    .service-image {
        height: 200px;
    }
    .gallery {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    footer {
        padding: 15px;
        font-size: 0.9em;
    }
    footer address {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    footer a {
        display: inline-block;
        padding: 5px 0;
    }
    #showcase {
        min-height: 250px;
    }
}

/* Modal responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
    }
    .close {
        top: 10px;
        right: 10px;
        font-size: 30px;
    }
}

@media (orientation: landscape) and (max-height: 576px) {
    .service-image {
        height: auto;
        max-height: 70vh;
    }
    #showcase {
        min-height: 70vh;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Performance optimizations and loading animations */
.gallery {
    content-visibility: auto;
    contain-intrinsic-size: 200px;
}

.service {
    content-visibility: auto;
    contain-intrinsic-size: 400px;
}

img {
    opacity: 0;
    transition: opacity 2s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

img[src] {
    opacity: 1;
}

.modal-content {
    opacity: 0.1;
    transition: opacity 2s linear;
}

.modal.show .modal-content {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    img {
        transition: none;
    }
    .gallery-item img:hover,
    .service-image:hover {
        transform: none;
    }
}
