/* =========================================
   STYLE_SERVICII.CSS
   Gestionare și Afișare Servicii (Admin & Public)
   ========================================= */

/* ----------------------------------------------------
   1. ADMIN PANEL - LAYOUT GESTIONARE
   ---------------------------------------------------- */
.admin-service-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #e2e8f0;
    padding: 2rem;
}

@media (min-width: 1024px) {
    .admin-service-wrapper {
        grid-template-columns: 1.2fr 0.8fr; /* Stânga mai lată pentru text */
        align-items: start;
    }
}

/* Coloana Stânga - Formular */
.admin-form-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-input, .admin-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s;
}

.admin-input:focus, .admin-textarea:focus {
    background: #fff;
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Coloana Dreapta - Media & Linkuri */
.admin-media-section {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}

.media-grid-4 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 Grid */
    gap: 1rem;
    margin-top: 1rem;
}

.upload-box {
    aspect-ratio: 1; /* Pătrat perfect */
    background: #fff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.upload-box.filled {
    border-style: solid;
    border-color: #e2e8f0;
    padding: 0;
}

.upload-box img, .upload-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-box .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
}

.youtube-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.youtube-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ef4444; /* YouTube Red */
}

.youtube-input-group input {
    padding-left: 2.5rem; /* Loc pentru icon */
}

/* ----------------------------------------------------
   2. PUBLIC - LISTA SERVICII (ULTRA COMPACT / SLIM CARD)
   ---------------------------------------------------- */
.services-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; 
    max-width: 1000px;
    margin: 0 auto;
}

.service-list-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 90px 1fr; 
}

@media (min-width: 768px) {
    .service-list-card {
        grid-template-columns: 110px 1fr; 
        min-height: 90px; 
    }
}

.service-list-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    border-color: #bfdbfe;
}

.service-list-thumb {
    position: relative;
    overflow: hidden;
    background: #f8fafc;
    height: 100%; 
    min-height: 90px;
}

.service-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-list-card:hover .service-list-thumb img {
    transform: scale(1.05);
}

.service-list-content {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.15rem;
}

.service-list-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.service-list-card:hover .service-list-title {
    color: #2563eb;
}

.service-list-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563eb;
    background: #eff6ff;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.service-list-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin: 0.15rem 0;
}

.badge-gallery, .badge-youtube {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 3px;
    line-height: 1;
}

.badge-gallery { background: #f1f5f9; color: #64748b; }
.badge-youtube { background: #fef2f2; color: #ef4444; }

.service-list-desc {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0.2rem 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-list-footer {
    display: none;
}

@media (min-width: 768px) {
    .service-list-footer {
        display: flex;
        justify-content: flex-end;
        margin-top: 0.25rem;
        padding-top: 0;
        border: none;
    }
    .btn-list-details {
        font-size: 0.75rem;
        padding: 0;
    }
}

.btn-list-details {
    color: #2563eb;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.btn-list-details:hover { gap: 0.5rem; text-decoration: none; }


/* ----------------------------------------------------
   3. PUBLIC - DETALII SERVICIU (Layout Nou)
   ---------------------------------------------------- */
.detail-hero-compact {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.15);
    margin-bottom: 2rem;
    height: 300px;
}

.detail-hero-compact img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-price-compact {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    background: rgba(255,255,255,0.98);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.video-container-16-9 {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1;
}

.video-container-16-9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --- LIGHTBOX (POPUP) --- */
.lightbox-overlay {
    display: none; /* Ascuns implicit */
    position: fixed;
    z-index: 99999; /* Foarte sus */
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-media {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -10px;
    color: white;
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    z-index: 100000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        position: fixed;
    }
}

/* ----------------------------------------------------
   4. PUBLIC - CTA SECTION (CONTACT) - service_detail.php
   ---------------------------------------------------- */
.cta-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-top: 4rem;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
}

/* Elemente decorative de fundal */
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    pointer-events: none;
}
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    pointer-events: none;
}

.cta-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 1.1rem;
    color: #dbeafe; /* blue-100 */
    max-width: 600px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.cta-btn {
    display: inline-block;
    background: #fbbf24; /* Amber-400 */
    color: #1e3a8a; /* Dark Blue Text */
    font-weight: 800;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
    position: relative;
    z-index: 1;
    text-decoration: none;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.5);
    background: #f59e0b; /* Amber-500 */
    color: #0f172a;
}