/* Services Grid Layout */
/* Services Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.services-grid .service-card {
    width: auto;
    box-sizing: border-box;
    margin-bottom: 0;
}

.managed-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* Service Cards */
a.service-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.service-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-radius 0.3s ease;
    /* Bouncy transition */
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    gap: 0 20px;
    align-items: start;
    height: 100%;
    position: relative;
    overflow: visible;
    /* overflow: visible needed for hit-area extension */
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Folded Corner Pseudo-Element */
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 0;
    background: linear-gradient(135deg, #f8f8f8 0%, #e6e6e6 100%);
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.1);
    /* Round Bottom-Right (Tip) AND Top-Left (Base) for smooth integration */
    border-radius: 40px 0 40px 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Red Line simulated via background to allow height expansion for hit-area */
    bottom: 0;
    background: var(--red-gradient) no-repeat top left;
    background-size: 100% 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    /* Ensure it's on top to catch mouse */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-bottom-right-radius: 40px;
    /* Cut the corner */
}

.service-card:hover::after {
    width: 40px;
    height: 40px;
}

.service-card:hover::before {
    opacity: 1;
    bottom: -10px;
    /* Exactly compensates for translateY(-10px) to hold original position */
}

/* Icons */
.service-icon {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    /* Center icon vertically relative to title */
    font-size: 32px;
    color: var(--red-accent);
    margin-bottom: 0;
    transition: transform 0.3s ease;
    background: rgba(231, 76, 60, 0.1);
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--red-gradient);
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Typography in Cards */
.service-card h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    font-size: 1.3em;
    margin-bottom: 0;
    color: var(--dark-text);
    font-weight: 700;
    line-height: 1.3;
}

.service-card p {
    grid-column: 1 / -1;
    margin-top: 20px;
    color: var(--light-text);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Features List */
.service-features {
    grid-column: 1 / -1;
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px solid var(--separator-color);
    padding-top: 20px;
}

.service-features li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: var(--light-text);
}

.service-features li::before {
    content: 'check_circle';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--red-accent);
    /* Green checkmarks */
    font-size: 18px;
}

/* Managed Services Specifics */
.managed-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.managed-card .service-icon {
    color: var(--blue-accent);
    background: rgba(52, 152, 219, 0.1);
}

.managed-card:hover .service-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.managed-card::before {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.managed-card .service-features li::before {
    color: var(--blue-accent);
}

/* Disable Hover Effects for Managed Services (Static) */
.managed-card:hover {
    transform: none;
    box-shadow: none;
    /* Or original shadow */
    border-bottom-right-radius: 12px;
    cursor: default;
}

.managed-card:hover::after {
    width: 0;
    height: 0;
}

.managed-card:hover::before {
    opacity: 0;
    bottom: 0;
    /* Prevent expansion on static cards */
}

.managed-card:hover .service-icon {
    transform: none;
    background: rgba(52, 152, 219, 0.1);
    color: var(--blue-accent);
    box-shadow: none;
}

/* Special Services List */
.special-services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.special-service-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.special-service-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-soft);
    border-left: 4px solid var(--red-accent);
}

.special-service-item span.material-symbols-outlined {
    font-size: 28px;
    color: var(--light-text);
    margin-right: 15px;
    transition: color 0.3s;
}

.special-service-item:hover span.material-symbols-outlined {
    color: var(--red-accent);
}

.special-service-item span:last-child {
    font-weight: 600;
    color: var(--dark-text);
}

/* Category Titles */
.service-category-title {
    font-size: 1.8em;
    color: var(--light-text);
    margin-top: 60px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    font-weight: 400;
    font-style: italic;
}

.service-category-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--red-accent);
    margin-top: 10px;
}

.services-intro {
    font-size: 1.1em;
    max-width: 800px;
    margin-bottom: 40px;
}

/* Tablet Adjustments (2 Columns) */
@media (max-width: 1400px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .services-grid .service-card {
        width: 100%;
    }

    .managed-services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-card {
        padding: 30px;
        height: auto;
        /* Fix for overlap issues on mobile */
    }
}

/* Sub-Category Titles for Service Groups */
.service-subcategory-title {
    font-size: 1.4em;
    color: var(--dark-text);
    margin-top: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 15px;
    border-left: 4px solid var(--red-accent);
    line-height: 1.2;
}