/* Services Section inherits background from main.css */

.services-grid {
    display: flex; /* Use flexbox for layout */
    flex-direction: column; /* Stack items vertically */
    gap: 60px; /* Space between service items */
}

.service-item {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Enhanced shadow */
    display: flex; /* Use flex for internal layout */
    flex-direction: column; /* Stack content and image vertically */
    color: var(--text-light);
    border: 1px solid var(--border-color-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-item:hover {
    /* Optional subtle hover effect */
    /* transform: translateY(-3px); */
    /* box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); */
}


.service-content {
    padding: 35px 40px; /* Adjusted padding */
    order: 1; /* Content appears first visually */
}

.service-item h3 {
    font-size: clamp(22px, 4vw, 26px); /* Responsive heading */
    margin-bottom: 15px;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

.service-item p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px; /* More space before button */
    color: var(--text-medium);
    max-width: 70ch; /* Limit line length for readability */
}

/* Style the "Inquire" link AS a button */
.service-item a.service-contact-link {
    /* Inherits .cta-button styles from main.css */
    /* Specific adjustments: */
    display: inline-block;
    margin-top: 10px;
    font-size: 16px;
    padding: 10px 24px;
    text-decoration: none;
}
.service-item a.service-contact-link:hover,
.service-item a.service-contact-link:focus {
    text-decoration: none;
}


/* Image container area */
.service-image-container {
    position: relative;
    width: 100%;
    order: 2; /* Image gallery appears below content */
}

.main-image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* REVERTED: Use a more standard 16:9 aspect ratio */
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    cursor: pointer;
    background-color: #222;
    border-bottom: 1px solid var(--border-color-subtle); /* Separator before thumbs */
}
.main-image-wrapper:focus-visible { /* Add focus style to wrapper */
     outline: 2px solid var(--focus-outline-color);
     outline-offset: -2px; /* Inset outline */
}


.main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
    opacity: 1; /* Start fully opaque */
}

.main-image-wrapper:hover .main-image {
    transform: scale(1.03);
    opacity: 0.95; /* Very subtle opacity change */
}

/* Arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5); /* Slightly darker */
    color: rgba(255, 255, 255, 0.9); /* Brighter arrow */
    border: none;
    font-size: 24px; /* Adjusted size */
    width: 40px; /* Adjusted size */
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    opacity: 0;
    visibility: hidden;
}
/* Show arrows on container hover/focus */
.service-image-container:hover .nav-arrow,
.service-image-container:focus-within .nav-arrow {
    opacity: 1;
    visibility: visible;
}

.nav-arrow:disabled {
    opacity: 0.3 !important;
    cursor: not-allowed;
    transform: translateY(-50%) scale(1);
    background-color: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.4);
    visibility: visible !important;
}


.nav-arrow:hover:not(:disabled) {
    background-color: var(--accent-gold);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}
.nav-arrow:focus-visible:not(:disabled) {
    background-color: var(--accent-gold);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
    /* Use main.css focus style */
}

.left-arrow {
    left: 15px;
}

.right-arrow {
    right: 15px;
}

/* Thumbnails */
.thumbnail-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: var(--card-bg-lighter); /* Lighter transparent bg */
}

.thumbnail {
    width: 80px;
    height: 55px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    opacity: 0.6;
    border: 2px solid transparent;
}

.thumbnail:hover {
    transform: scale(1.08); /* Slightly more scale */
    opacity: 1;
    border-color: var(--accent-gold-darker);
}
/* Focus style handled by main.css */

.thumbnail.active {
    opacity: 1;
    transform: scale(1.05);
    border-color: var(--accent-gold); /* Solid gold border when active */
    box-shadow: 0 0 8px rgba(186, 153, 101, 0.5); /* Add subtle glow */
}
.thumbnail.active:hover {
     transform: scale(1.05); /* Keep scale when active */
     border-color: var(--accent-gold);
}
/* Active focus handled by main.css */

/* Responsive adjustments for services */
@media (min-width: 992px) {
    .service-item {
         flex-direction: row; /* Side-by-side on larger screens */
    }
    .service-content {
        width: 45%; /* Adjust width */
        order: 1; /* Content first */
        padding: 40px;
    }
    .service-image-container {
        width: 55%; /* Adjust width */
        order: 2; /* Image second */
    }
    /* Alternate layout for even/odd items */
    .service-item:nth-child(even) .service-content {
        order: 2;
    }
     .service-item:nth-child(even) .service-image-container {
        order: 1;
    }
     .main-image-wrapper {
         border-bottom: none; /* Remove border */
         border-left: 1px solid var(--border-color-subtle); /* Add side border */
     }
     .service-item:nth-child(even) .main-image-wrapper {
         border-left: none;
         border-right: 1px solid var(--border-color-subtle);
     }
     .thumbnail-container {
         border-top: 1px solid var(--border-color-subtle);
     }

}