/* 
css/service.css
Styling for Vårt tilbud section */
.services-section {
    background-color: var(--bg-gray);
    text-align: center;
}

.services-section h2 {
    font-size: var(--font-size-h2);
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
}

.services-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin: 0 auto;
    max-width: 1500px;  /* Increased from 1025px to 1500px for wider content */
}

.service {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 300px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.service img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.service:hover img {
    opacity: 0.9;
}

.service-preview {
    padding: 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.service h3 {
    font-size: var(--font-size-h4);
    color: var(--color-primary);
    margin-bottom: 5px;
    line-height: var(--line-height-tight);
    font-weight: var(--font-weight-semibold);
}

.service-subtitle {
    font-size: var(--font-size-body-lg);
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.service-summary {
    font-size: var(--font-size-body);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: 20px;
    font-weight: var(--font-weight-normal);  /* Normal weight - larger font size provides readability */
}

.service-details-btn {
    background-color: var(--color-primary);
    color: var(--text-white);
    border: none;
    padding: 10px 15px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: var(--font-size-body-sm);  /* Now 16px (increased in variables.css) */
    font-weight: var(--font-weight-semibold);  /* Semibold for elderly users */
    margin-top: auto;
}

.service-details-btn:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Service Modal Styles */
#serviceModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease-out, backdrop-filter 0.3s ease-out;
}

/* Service modal show state */
#serviceModal.show {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

/* Service modal content */
#serviceModal .modal-content {
    background-color: #fff;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 1500px;  /* Increased from 1025px to 1500px for wider content */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0);
    max-height: 85vh;
    overflow-y: auto;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Service modal content show state */
#serviceModal.show .modal-content {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Service details styling */
.service-details-modal {
    padding: 20px 0;
}

.service-details-modal h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.service-details-modal .subtitle {
    color: #555;
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.service-details-modal img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.service-details-modal .description {
    line-height: 1.6;
    color: #333;
    text-align: left;
}

.service-details-modal .section {
    margin-bottom: 20px;
}

.service-details-modal .back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #555;
    color: white;
    border: none;
    border-radius: 4px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.service-details-modal .back-button:hover {
    background-color: #333;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .services-container {
        padding: 0 10px;
    }
    
    .service {
        width: 100%;
        max-width: 350px;
    }
    
    #serviceModal {
        padding: 10px;
    }
    
    #serviceModal .modal-content {
        width: 95%;
        padding: 25px 20px;
        border-radius: 16px;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        max-height: 90vh;
        opacity: 0;
        transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    #serviceModal.show .modal-content {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}