/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito Sans', Arial, sans-serif;
    background-color: #f5f5f5;
    line-height: 1.6;
}

/* Contenedor principal */
.cert-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 40px;
}

/* Header con imagen de fondo */
.cert-header {
    align-self: stretch;
    height: 400px;
    position: relative;
    background: white;
    overflow: hidden;
}

.cert-header-bg {
    width: 100%;
    min-width: 1728px;
    height: 330px;
    top: 70px;
    position: absolute;
    object-fit: cover;
    object-position: center;
}

.cert-header-content {
    width: 550px;
    left: 309px;
    top: 155.50px;
    position: absolute;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

.cert-title {
    align-self: stretch;
    color: white;
    font-size: 56px;
    font-family: 'Encode Sans', Arial, sans-serif;
    font-weight: 800;
    word-wrap: break-word;
    line-height: 1.2;
}

.cert-title-highlight {
    color: #26B4BD;
    font-size: 56px;
    font-family: 'Encode Sans', Arial, sans-serif;
    font-weight: 800;
    word-wrap: break-word;
}

/* Contenido principal */
.cert-main-content {
    width: 100%;
    max-width: 1130px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Sección de bienvenida */
.cert-welcome {
    width: 100%;
}

.cert-welcome-text {
    color: #393939;
    font-size: 18px;
    font-family: 'Nunito Sans', Arial, sans-serif;
    font-weight: 700;
    word-wrap: break-word;
}

.cert-welcome-name {
    color: #203E7C;
    font-size: 18px;
    font-family: 'Nunito Sans', Arial, sans-serif;
    font-weight: 700;
    word-wrap: break-word;
}

.cert-btn-exit {
    width: 264px;
    height: 48px;
    padding: 12px 24px;
    background: #26B4BD;
    border-radius: 60px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 18px;
    font-family: 'Encode Sans', Arial, sans-serif;
    font-weight: 500;
    word-wrap: break-word;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.cert-btn-exit:hover {
    background: #1e9aa1;
}

/* Título de sección */
.cert-section-title {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 14px;
}

.cert-section-title h2 {
    margin: 0;
}

.cert-title-gray {
    color: #393939;
    font-size: 28px;
    font-family: 'Encode Sans', Arial, sans-serif;
    font-weight: 800;
    word-wrap: break-word;
}

.cert-title-blue {
    color: #203E7C;
    font-size: 28px;
    font-family: 'Encode Sans', Arial, sans-serif;
    font-weight: 800;
    word-wrap: break-word;
}

.cert-section-description {
    color: #393939;
    font-size: 18px;
    font-family: 'Nunito Sans', Arial, sans-serif;
    font-weight: 400;
    word-wrap: break-word;
    margin: 0;
}

.cert-section-description strong {
    font-weight: 700;
}

/* Grid de pólizas */
.cert-policies-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(530px, 1fr));
    gap: 30px;
    justify-content: flex-start;
}

/* Card de póliza */
.cert-policy-card {
    width: 530px;
    height: 140px;
    padding: 20px 30px;
    background: white;
    box-shadow: 0px 0px 20px rgba(32, 61, 124, 0.26);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
	cursor: pointer;
}

.card-clickable-area {

    height: 100%;
    width: 100%;
}

.cert-policy-card:hover {
    box-shadow: 0px 0px 20px rgba(32, 61, 124, 0.50);
}

.cert-card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.cert-policy-number {
    color: #203E7C;
    font-size: 18px;
    font-family: 'Nunito Sans', Arial, sans-serif;
    font-weight: 700;
    word-wrap: break-word;
    text-align: left;
}

.cert-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cert-policy-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cert-info-item {
    color: black;
    font-size: 14px;
    font-family: 'Nunito Sans', Arial, sans-serif;
    font-weight: 400;
    word-wrap: break-word;
    line-height: 1.3;
}

.cert-info-label {
    font-weight: 700;
}

/* Botón de descarga */
.cert-download-btn {
    width: 66.80px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.cert-download-btn:hover {
    transform: scale(1.1);
}

.cert-download-icon {
    width: 68px;
    height: 58px;
    filter: brightness(0) saturate(100%) invert(13%) sepia(48%) saturate(2342%) hue-rotate(208deg) brightness(95%) contrast(86%);
}

/* Mensaje sin pólizas */
.cert-no-policies {
    text-align: center;
    margin-top: 40px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0px 0px 20px rgba(32, 61, 124, 0.26);
}

.cert-no-policies-title {
    font-size: 18px;
    font-weight: 700;
    color: #393939;
    margin-bottom: 20px;
}

.cert-no-policies-text {
    font-size: 16px;
    color: #393939;
    margin-bottom: 15px;
    line-height: 1.6;
}

.cert-contact-info {
    font-size: 16px;
    color: #203E7C;
    font-weight: 600;
    margin: 0;
}

/* Modal */
.cert-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.cert-modal {
    width: 90%;
    max-width: 600px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cert-modal-content {
    padding: 0;
}

.cert-modal-header {
    padding: 30px 30px 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
}

.cert-modal-greeting {
    color: #203E7C;
    font-size: 18px;
    font-weight: 700;
}

.cert-modal-name {
    color: #203E7C;
}

.cert-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.cert-modal-close:hover {
    background-color: #f0f0f0;
}

.cert-modal-body {
    padding: 20px 30px;
    text-align: center;
}

.cert-modal-text {
    margin-bottom: 20px;
    font-size: 16px;
    color: #393939;
    line-height: 1.6;
}

.cert-modal-question {
    margin: 0;
    font-size: 16px;
    color: #393939;
    font-weight: 600;
}

.cert-modal-footer {
    padding: 0 30px 30px 30px;
    border-top: none;
    display: flex;
    gap: 15px;
}

/* Botones del modal */
.cert-btn {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cert-btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.cert-btn-secondary:hover {
    background: #e0e0e0;
}

.cert-btn-primary {
    background: #203E7C;
    color: white;
}

.cert-btn-primary:hover {
    background: #1a3566;
}

/* Spinner para botón de descarga */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.125em solid transparent;
    border-right-color: currentColor;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border.text-light {
    color: white !important;
}

@keyframes spinner-border {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Animaciones */
.aparecer {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries - Responsive */
@media (max-width: 1200px) {
    .cert-header-content {
        left: 50px;
        width: calc(100% - 100px);
    }
    
    .cert-policies-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .cert-header {
        height: 300px;
    }
    
    .cert-header-content {
        left: 20px;
        top: 100px;
        width: calc(100% - 40px);
    }
    
    .cert-title {
        font-size: 36px;
    }
    
    .cert-title-highlight {
        font-size: 36px;
    }
    
    .cert-btn-exit {
        width: 100%;
        align-self: stretch;
    }
    
    .cert-policies-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cert-policy-card {
        width: 100%;
        height: auto;
        min-height: 140px;
        padding: 15px 20px;
    }
    
    .cert-card-body {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cert-download-btn {
        align-self: center;
    }
    
    .cert-modal {
        width: 95%;
        margin: 20px;
    }
    
    .cert-modal-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cert-main-content {
        padding: 0 15px;
    }
    
    .cert-policy-card {
        width: 100%;
        height: auto;
        min-height: 140px;
        padding: 15px;
    }
    
    .cert-modal-header,
    .cert-modal-body,
    .cert-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}