/* Container */
.arac-services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

/* Base Item Styles */
.arac-service-item {
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.service-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.service-content {
    padding: 20px;
    flex: 1;
}

.service-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
}

/* Style 1: Modern Card (Default) */
.style-1 .arac-service-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.style-1 .arac-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.style-1 .service-image {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.style-1 .read-more-btn {
    background-color: #3b82f6;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s;
}

.style-1 .read-more-btn:hover {
    background-color: #2563eb;
}


/* Style 2: Minimal Card */
.style-2 .arac-service-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
}

.style-2 .arac-service-item:hover {
    border-color: #9ca3af;
}

.style-2 .service-title {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1.1rem;
}

.style-2 .read-more-btn {
    background: transparent;
    color: #374151;
    border: 1px solid #374151;
    padding: 6px 12px;
    margin-top: 15px;
    cursor: pointer;
}

.style-2 .read-more-btn:hover {
    background: #374151;
    color: #fff;
}


/* Style 3: Image Focused */
.style-3 .arac-service-item {
    border-radius: 16px;
    position: relative;
    height: 300px;
}

.style-3 .service-inner {
    position: relative;
    z-index: 1;
}

.style-3 .service-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    transition: transform 0.5s;
}

.style-3 .arac-service-item:hover .service-image {
    transform: scale(1.1);
}

.style-3 .service-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

.style-3 .service-title {
    color: white;
}

.style-3 .service-description-preview {
    color: rgba(255, 255, 255, 0.9);
}

.style-3 .read-more-btn {
    display: none;
    /* Hide button, whole card is clickable */
}


/* Style 4: Dark Mode */
.style-4 .arac-service-item {
    background: #1f2937;
    /* Dark Gray */
    color: #f3f4f6;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.style-4 .service-image {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    opacity: 0.9;
}

.style-4 .arac-service-item:hover .service-image {
    opacity: 1;
}

.style-4 .service-title {
    color: #60a5fa;
    /* Blue accent */
}

.style-4 .read-more-btn {
    background-color: #374151;
    color: #60a5fa;
    border: 1px solid #60a5fa;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
}

.style-4 .read-more-btn:hover {
    background-color: #60a5fa;
    color: #1f2937;
}


/* Modal Styles */
.arac-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    /* Darker overlay */
    backdrop-filter: blur(5px);
    padding: 20px;
    /* Prevent touching edges */
    box-sizing: border-box;
    overflow: hidden;
    /* Prevent background scroll */
}

.arac-modal-content {
    background-color: #fefefe;
    margin: 0 auto;
    /* Centered by flex/transform */
    padding: 0;
    border-radius: 16px;
    width: 100%;
    max-width: 1100px;
    /* Wider Modal */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    max-height: 90vh;
    /* Constrain height */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Contain children */
}

.arac-close {
    color: #333;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    z-index: 20;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.arac-close:hover,
.arac-close:focus {
    color: #000;
    background: #fff;
    transform: rotate(90deg);
}

.arac-modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    /* Scrollable on mobile */
}

.arac-modal-media-column {
    display: flex;
    flex-direction: column;
    height: auto;
}

.arac-modal-image {
    width: 100%;
    height: 250px;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.arac-modal-gallery {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f9fafb;
    overflow-x: auto;
    white-space: nowrap;
}

.arac-modal-thumb {
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.arac-modal-thumb:hover,
.arac-modal-thumb.active {
    border-color: #3b82f6;
    transform: scale(1.05);
}

.arac-modal-text {
    padding: 40px;
}

.arac-modal-title {
    margin-top: 0;
    color: #000000 !important;
    /* Force Black */
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.arac-modal-description {
    color: #4b5563;
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Scrollbar Customization */
.arac-modal-text::-webkit-scrollbar,
.arac-modal-body::-webkit-scrollbar,
.arac-modal-gallery::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.arac-modal-text::-webkit-scrollbar-track,
.arac-modal-body::-webkit-scrollbar-track,
.arac-modal-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.arac-modal-text::-webkit-scrollbar-thumb,
.arac-modal-body::-webkit-scrollbar-thumb,
.arac-modal-gallery::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.arac-modal-text::-webkit-scrollbar-thumb:hover,
.arac-modal-body::-webkit-scrollbar-thumb:hover,
.arac-modal-gallery::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Responsive Modal (Desktop) */
@media (min-width: 768px) {
    .arac-modal-body {
        flex-direction: row !important;
        /* Force side-by-side */
        overflow: hidden;
    }

    .arac-modal-media-column {
        width: 50% !important;
        height: 100%;
        background-color: #f9fafb;
        border-right: 1px solid #e5e7eb;
        display: flex;
        flex-direction: column;
    }

    .arac-modal-image {
        width: 100%;
        flex: 1;
        /* Grow to fill space */
        height: auto;
        min-height: 300px;
        /* Force minimum height to prevent collapse */
        border-radius: 0;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
        background-color: #f3f4f6;
        /* Placeholder color */
        margin-top: 10px;
    }

    /* Ensure no other images are visible at top */
    .arac-modal-media-column>*:not(.arac-modal-image):not(.arac-modal-gallery) {
        display: none;
    }

    .arac-modal-gallery {
        padding: 15px;
        background: white;
        border-bottom: 1px solid #eee;
        /* Separator below gallery */
        border-top: none;
        justify-content: flex-start;
        display: flex;
        flex-shrink: 0;
        /* check do not shrink */
        min-height: 90px;
    }

    .arac-modal-text {
        width: 50% !important;
        padding: 50px;
        overflow-y: auto;
        max-height: 100%;
        position: relative;
    }
}