/* =============================================
   SERVICII AUTO – RESPONSIVE + MODAL PERFECT PE MOBIL
============================================= */

.services-section {
    padding: 130px 5% 120px;
    max-width: 1600px;
    margin: 0 auto;
}

.services-header {
    text-align: center;
    margin-bottom: 70px;
}

.services-header h1 {
    font-size: 3.2rem;
    font-weight: 300;
    margin-bottom: 16px;
}

.services-header p {
    font-size: 1.25rem;
    opacity: 0.85;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.7;
}

/* GRID RESPONSIVE */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

@media (max-width: 700px) {
    .services-grid { grid-template-columns: 1fr; gap: 32px; }
    .services-header h1 { font-size: 2.6rem; }
    .services-header p { font-size: 1.15rem; }
    .services-section { padding: 100px 5% 100px; }
}

/* CARDURI */
.service-card {
    background: #1a1a1a;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
}

.service-card:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 0 40px 80px rgba(0,170,255,0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,170,255,0.22), transparent 65%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 24px;
    pointer-events: none;
}
.service-card:hover::before { opacity: 1; }

.service-img { height: 260px; overflow: hidden; }
.service-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s ease;
}
.service-card:hover .service-img img { transform: scale(1.2); }

.service-info {
    padding: 34px 28px;
    text-align: center;
}
.service-info h3 { font-size: 1.58rem; margin-bottom: 14px; color: #fff; }
.service-info p { font-size: 1.02rem; opacity: 0.9; line-height: 1.7; }

/* =============================================
   MODAL – PERFECT PE MOBIL (butonul de închidere întotdeauna vizibil)
============================================= */
.service-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    backdrop-filter: blur(14px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;               /* spațiu pe margini pe mobil */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    overflow-y: auto;            /* scroll dacă e prea mare */
}

.service-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 26px;
    width: 100%;
    max-width: 540px;            /* mai mic ca să încapă bine pe mobil */
    max-height: 92vh;            /* nu depășește ecranul */
    padding: 48px 32px 36px;     /* spațiu sus pentru butonul X */
    position: relative;
    box-shadow: 0 35px 90px rgba(0,170,255,0.35);
    border: 1.5px solid rgba(0,170,255,0.25);
    animation: modalPop 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow-y: auto;
}

@keyframes modalPop {
    from { transform: scale(0.88); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* BUTONUL X – ÎNTOTDEAUNA VIZIBIL ȘI ACCESIBIL */
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 32px;
    color: #fff;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.modal-close:hover {
    background: #0af;
    color: #000;
    transform: rotate(90deg) scale(1.1);
}

/* Restul stilurilor modalului */
.modal-title {
    font-size: 2.1rem;
    margin-bottom: 18px;
    text-align: center;
    color: #0af;
    font-weight: 500;
}

.modal-text {
    font-size: 1.12rem;
    line-height: 1.8;
    margin-bottom: 26px;
    opacity: 0.95;
}

.modal-contact {
    background: #111;
    padding: 26px;
    border-radius: 18px;
    text-align: center;
    margin: 24px 0;
    border: 1px solid #333;
}

.modal-contact h4 {
    margin-bottom: 14px;
    color: #0af;
    font-size: 1.35rem;
}

.modal-phone {
    font-size: 2rem;
    font-weight: 700;
    color: #0af;
    margin: 14px 0;
}

.modal-address {
    opacity: 0.9;
    line-height: 1.7;
    margin: 18px 0;
    font-size: 1.05rem;
}

.modal-map {
    height: 220px;
    border-radius: 14px;
    overflow: hidden;
    margin: 26px 0;
    border: 2.5px solid #0af;
    box-shadow: 0 0 20px rgba(0,170,255,0.3);
}

.modal-actions {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 28px;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    padding: 15px 34px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(37,211,102,0.4);
}

/* MOBIL – EXTRA OPTIMIZĂRI */
@media (max-width: 600px) {
    .modal-content {
        padding: 50px 24px 32px;
        max-height: 94vh;
    }
    .modal-close {
        width: 52px;
        height: 52px;
        font-size: 36px;
        top: 10px;
        right: 10px;
    }
    .modal-title { font-size: 1.9rem; }
    .modal-phone { font-size: 1.8rem; }
}