/* Product/Service Card Stylesheet v3.0.0 (Clean White Card Theme) */

/* --- Overall Grid Wrapper --- */
.psc-list-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* --- Grid Layout --- */
.psc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px; /* Spacing between cards */
}

/* --- Clickable Card Wrapper (The entire card acts as a trigger) --- */
.psc-popup-trigger {
    cursor: pointer;
    display: block; /* Make the entire div clickable */
    text-decoration: none;
    color: inherit; /* Inherit text color, then override specific elements */
}

/* --- Individual Card Styling --- */
.psc-card {
    position: relative; /* Essential for positioning the featured badge */
    height: 100%; /* Ensures cards in a row have equal height */
    background-color: #ffffff !important; /* Forces card background to white, overrides theme */
    border: 1px solid #e0e0e0; /* Light grey border */
    border-radius: 12px;
    overflow: hidden; /* Ensures image corners are rounded with card */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* --- Card Hover Effect --- */
.psc-card:hover {
    transform: translateY(-5px); /* Lift card slightly */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); /* Enhanced shadow */
}

/* --- Card Image --- */
.psc-card-image img {
    width: 100%;
    height: 220px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures image covers area without distortion */
    display: block;
    line-height: 0; /* Prevents extra space below image */
}

/* --- Card Info Section (Padding for all text content) --- */
.psc-card-info {
    padding: 15px 20px; /* Top/bottom 15px, left/right 20px */
    text-align: left;
}

/* --- Spacing for lines within card info --- */
.psc-card-line {
    margin-bottom: 12px;
}
.psc-card-info .psc-card-line:last-child {
    margin-bottom: 0; /* No bottom margin on the last line */
}

/* --- Card Header (Title & Rating on the same line) --- */
.psc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px; /* Space between title and rating */
}

/* --- Card Title --- */
.psc-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #000000 !important; /* Force title to black */
    transition: color 0.2s;
}
.psc-card:hover .psc-card-title {
    color: #e72e77; /* Pink/Red accent on hover */
}

/* --- Card Rating --- */
.psc-card-rating {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap; /* Keep rating on one line */
    color: #333333 !important; /* Dark grey for rating numbers */
}
.psc-card-rating span {
    font-size: 14px;
    color: #777777 !important; /* Lighter grey for review count */
    font-weight: 400;
}

/* --- Card Location --- */
.psc-card-location {
    font-size: 14px;
    color: #555555 !important; /* Darker grey for location text */
}

/* --- Card Price Section --- */
.psc-card-price {
    border-top: 1px solid #f0f0f0; /* Light grey separator line */
    padding-top: 12px;
    margin-top: 12px;
}
.psc-card-price span { /* "Starting From" text */
    font-size: 13px;
    color: #777777 !important; /* Light grey */
    display: block;
    margin-bottom: 2px;
}
.psc-card-price strong { /* Actual Price amount */
    font-size: 20px;
    font-weight: 700;
    color: #333333 !important; /* Dark grey */
    margin-right: 5px;
}
.psc-card-price small { /* "Per Project/Month" text */
    font-size: 14px;
    color: #555555 !important; /* Darker grey */
}

/* --- Card Tags --- */
.psc-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Space between tags */
    padding-top: 5px;
    min-height: 30px; /* Ensures consistent layout even with few tags */
}
.psc-tag {
    background-color: #f0f0f0 !important; /* Light grey tag background */
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #555555 !important; /* Darker grey tag text */
    white-space: nowrap;
}

/* --- Featured Badge (Crown Icon) --- */
.psc-featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #ffc107; /* Gold color for background */
    color: #fff; /* White crown icon */
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 10;
}

/* =============================================================================
   Modal / Popup Styles
   ========================================================================== */
.psc-modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Dark semi-transparent background */
    z-index: 1000; /* Ensure it's on top of everything */
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.psc-modal-content {
    background-color: #ffffff !important; /* Force modal content to white */
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh; /* Limit height for scrollability */
    overflow-y: auto;
    position: relative;
    display: flex; /* Image and text side-by-side */
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.psc-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #888888; /* Grey close button */
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}
.psc-modal-close:hover {
    color: #000000; /* Black on hover */
}

.psc-modal-image {
    width: 45%; /* Image takes 45% of modal width */
    object-fit: cover;
    border-radius: 10px 0 0 10px; /* Rounded corners only on the left side */
}

.psc-modal-text {
    width: 55%; /* Text takes 55% of modal width */
    padding: 30px;
    box-sizing: border-box;
}

.psc-modal-title {
    font-size: 26px;
    margin: 0 0 15px 0;
    font-weight: 700;
    color: #111111 !important; /* Force modal title to dark grey */
}

.psc-modal-description {
    font-size: 16px;
    line-height: 1.6;
    color: #555555 !important; /* Force modal description to dark grey */
    margin-bottom: 30px;
}
.psc-modal-description p {
    margin: 0 0 1em 0;
}

.psc-modal-button {
    display: inline-block;
    background-color: #e72e77; /* Pink/Red button */
    color: #ffffff !important; /* White button text */
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s;
}
.psc-modal-button:hover {
    background-color: #c21e60; /* Darker pink/red on hover */
    color: #ffffff;
}

/* --- Responsive Adjustments for Grid --- */
@media (max-width: 992px) {
    .psc-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}
@media (max-width: 600px) {
    .psc-grid {
        grid-template-columns: 1fr; /* 1 column on small screens */
    }
}

/* --- Responsive Adjustments for Modal --- */
@media (max-width: 768px) {
    .psc-modal-content {
        flex-direction: column; /* Stack image and text vertically */
        max-height: 85vh;
    }
    .psc-modal-image {
        width: 100%; /* Image takes full width */
        height: 250px;
        border-radius: 10px 10px 0 0; /* Rounded corners on top only */
    }
    .psc-modal-text {
        width: 100%; /* Text takes full width */
        padding: 25px;
    }
}