/* ========================================
   PLANES DE MANTENIMIENTO - VOLVO
   ======================================== */

/* === VARIABLES === */
:root {
    --volvo-blue: #4b4c4c;
    --volvo-blue-dark: #95999e;
    --volvo-blue-light: #b1c9e2;
    --volvo-gray: #333333;
    --volvo-gray-light: #f8f9fa;
    --volvo-border: #dee2e6;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* === HERO SECTION === */
.hero-pdp.hero-vehiculos {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.hero-pdp .background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-pdp .background-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-pdp .text-hero-align {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.hero-pdp .box-text {
    text-align: center;
    color: white;
    padding: 30px;
    max-width: 800px;
}

.hero-pdp .box-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin: 0;
    letter-spacing: 1px;
}

/* === TÍTULOS Y TEXTOS === */
.titulo-container {
    padding: 60px 20px;
}

.titulo-container .titulo {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--volvo-gray);
    margin-bottom: 20px;
    line-height: 1.3;
}

.titulo-container .text-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 900px;
}

.text-servicios__align {
    max-width: 1200px;
    margin: 0 auto;
}

/* === GRID DE PLANES DE MANTENIMIENTO === */
.item-list.item-servicios-vps {
    display: grid;
    gap: 40px;
    padding: 60px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.item-list.item-servicios-vps > div {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.item-list.item-servicios-vps > div:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.item-list.item-servicios-vps .col-12 {
    padding: 0;
}

/* === TARJETAS DE MANTENIMIENTO === */
.item-list .titulo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--volvo-gray);
    padding: 25px 30px;
    margin: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 3px solid var(--volvo-blue);
}

.item-list img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.content-item-list {
    padding: 30px;
    text-align: center;
}

/* === BOTÓN VER VEHÍCULO === */
.btn-ver-vehiculo {
    background: linear-gradient(135deg, var(--volvo-blue) 0%, var(--volvo-blue-dark) 100%);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-speed);
    box-shadow: var(--shadow-sm);
    margin-top: 15px;
    display: inline-block;
}

.btn-ver-vehiculo:hover {
    background: linear-gradient(135deg, var(--volvo-blue-light) 0%, var(--volvo-blue) 100%);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-ver-vehiculo:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* === MODAL === */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.75);
    animation: fadeIn var(--transition-speed);
    backdrop-filter: blur(3px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-container {
    background-color: white;
    margin: 20px;
    padding: 0;
    width: 90%;
    max-width: 900px;
    border-radius: 16px;
    animation: slideDown var(--transition-speed);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header-custom {
    padding: 25px 30px;
    background: linear-gradient(135deg, var(--volvo-blue) 0%, var(--volvo-blue-dark) 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-custom h5 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-body-custom {
    padding: 40px 30px;
    text-align: center;
    background: white;
}

.modal-body-custom img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.modal-body-custom p {
    color: #666;
    font-size: 1.1rem;
    margin: 40px 0;
}

.modal-footer-custom {
    padding: 20px 30px;
    background-color: var(--volvo-gray-light);
    text-align: right;
    border-top: 1px solid var(--volvo-border);
}

/* === BOTONES DEL MODAL === */
.close-modal {
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: transform var(--transition-speed);
    opacity: 0.9;
}

.close-modal:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.btn-cerrar {
    background-color: #6c757d;
    color: white;
    padding: 12px 35px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cerrar:hover {
    background-color: #5a6268;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

/* === ANIMACIONES === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .item-list.item-servicios-vps {
        grid-template-columns: 1fr 1fr !important;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero-pdp.hero-vehiculos {
        height: 400px;
    }

    .hero-pdp .box-text h1 {
        font-size: 2.5rem;
    }

    .titulo-container {
        padding: 40px 15px;
    }

    .titulo-container .titulo {
        font-size: 2rem;
    }

    .item-list.item-servicios-vps {
        grid-template-columns: 1fr !important;
        gap: 25px;
        padding: 40px 15px;
    }

    .item-list .titulo {
        font-size: 1.5rem;
        padding: 20px;
    }

    .item-list img {
        height: 280px;
    }

    .content-item-list {
        padding: 20px;
    }

    .btn-ver-vehiculo {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .modal-container {
        width: 95%;
        margin: 10px;
    }

    .modal-header-custom {
        padding: 20px;
    }

    .modal-header-custom h5 {
        font-size: 1.2rem;
    }

    .modal-body-custom {
        padding: 25px 20px;
    }

    .close-modal {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .hero-pdp.hero-vehiculos {
        height: 300px;
    }

    .hero-pdp .box-text h1 {
        font-size: 1.8rem;
    }

    .titulo-container .titulo {
        font-size: 1.6rem;
    }

    .item-list img {
        height: 220px;
    }

    .btn-ver-vehiculo {
        padding: 10px 25px;
        font-size: 0.85rem;
    }
}

/* === UTILIDADES === */
.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.p-0 {
    padding: 0;
}

/* === MEJORAS DE ACCESIBILIDAD === */
*:focus-visible {
    outline: 3px solid var(--volvo-blue);
    outline-offset: 2px;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* === IMPRESIÓN === */
@media print {
    .modal-overlay,
    .btn-ver-vehiculo {
        display: none;
    }

    .item-list.item-servicios-vps > div {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* === EFECTO FLIP EN MODAL === */
.flip-card-modal {
    background-color: transparent;
    perspective: 1000px;
    cursor: pointer;
    margin: 0 auto;
    max-width: 100%;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card-modal.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.flip-card-front {
    position: relative;
}

.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
}

.flip-card-front img,
.flip-card-back img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Indicador visual de que es clickeable */
.flip-card-modal::after {
    content: '↻';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 102, 204, 0.9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    opacity: 0.8;
    transition: opacity 0.3s;
    z-index: 10;
    pointer-events: none;
}

.flip-card-modal:hover::after {
    opacity: 1;
}

/* Leyenda en el modal */
.modal-legend {
    margin-top: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid var(--volvo-blue);
    border-radius: 4px;
    color: #333;
    font-size: 0.95rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-legend i {
    color: var(--volvo-blue);
    font-size: 1.2rem;
}

/* Mensaje cuando no hay tabla */
.no-tabla-message {
    padding: 30px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive para flip card */
@media (max-width: 768px) {
    .flip-card-modal::after {
        width: 35px;
        height: 35px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
    
    .modal-legend {
        font-size: 0.85rem;
        padding: 10px 15px;
    }
}

/* === FORZAR TODO EL TEXTO CENTRADO === */
.titulo-container.text-center-all * {
    text-align: center !important;
}

.titulo-container.text-center-all {
    text-align: center !important;
}

.titulo-container.text-center-all p,
.titulo-container.text-center-all div,
.titulo-container.text-center-all span {
    text-align: center !important;
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}