@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Contenedor principal de la vCard */
.vcard-container {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(to bottom, #fff5f6 0%, #fff5f6 15%, #f0ebf3 35%, #e6dde8 55%, #dcd2dd 75%, #a9a5bf 100%);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

/* Sección de perfil */
.profile-section {
    position: relative;
    height: 380px;
    background-color: transparent;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
}

.profile-image {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    z-index: 1;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.profile-info {
    position: absolute;
    bottom: 20px;
    left: -20px;
    width: 65%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 20px 10px 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    border-radius: 0 20px 20px 0;
    transform: translateX(0);
    z-index: 2;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.profile-info h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.profile-info h2 {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

/* Sección de logo y sitio web */
.logo-section {
    background-color: transparent;
    color: #5e1a8b;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    width: 60px;
    height: 60px;
}

.website {
    display: flex;
    align-items: center;
}

.website a {
    color: #5e1a8b;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

/* Sección de biografía */
.bio-section {
    background-color: transparent;
    padding: 25px 20px;
    text-align: justify;
}

.bio-section p {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.bio-section p:last-child {
    margin-bottom: 0;
}

/* Botones de contacto */
.contact-buttons {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    background-color: transparent;
}

.contact-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-button img {
    width: 50px;
    height: 50px;
}

.contact-button:hover, .contact-button:active {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(94, 26, 139, 0.4);
}

/* Botones de acción */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: transparent;
}

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #5e1a8b;
    transition: transform 0.3s, box-shadow 0.3s;
    background-color: transparent;
}

.action-button:hover, .action-button:active {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(94, 26, 139, 0.25);
}

#share-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

#share-button img {
    width: 50px;
    height: 50px;
}

#add-contact-button {
    width: 150px;
    height: 60px;
    border-radius: 15px;
}

#add-contact-button img {
    width: 140px;
    height: 50px;
}

/* Footer */
.footer {
    background-color: #a9a5bf;
    color: #5e1a8b;
    text-align: center;
    padding: 15px;
    font-size: 12px;
}

.footer p {
    margin: 5px 0;
}

/* Media queries para responsividad */
@media (min-width: 768px) {
    .vcard-container {
        max-width: 500px;
    }
    
    .profile-section {
        height: 420px;
    }
    
    .profile-image {
        width: 320px;
        height: 320px;
        top: 25px;
    }
    
    .profile-info {
        bottom: 25px;
        left: -25px;
        width: 60%;
        padding: 12px 25px 12px 35px;
        border-radius: 0 25px 25px 0;
    }
    
    .profile-info h1 {
        font-size: 1.4rem;
    }
    
    .profile-info h2 {
        font-size: 1rem;
    }
    
    .bio-section p {
        font-size: 16px;
    }
    
    .contact-button {
        width: 70px;
        height: 70px;
    }
    
    .contact-button img {
        width: 60px;
        height: 60px;
    }
    
    #share-button {
        width: 70px;
        height: 70px;
    }
    
    #share-button img {
        width: 60px;
        height: 60px;
    }
    
    #add-contact-button {
        width: 170px;
        height: 70px;
    }
    
    #add-contact-button img {
        width: 160px;
        height: 60px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 20px;
    width: 80%;
    max-width: 400px;
    text-align: center;
    position: relative;
    transform: scale(0.1);
    transform-origin: center bottom;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
    opacity: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
    animation: balloonPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hide .modal-content {
    transform: scale(0.1);
    opacity: 0;
    animation: balloonDeflate 0.4s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

@keyframes balloonPop {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes balloonDeflate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.1);
        opacity: 0;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 10px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

.modal-content h3 {
    color: #5e1a8b;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.cv-options {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.cv-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #5e1a8b;
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.3s, background-color 0.3s;
}

.cv-option:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

.cv-option img {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
}

.cv-option span {
    font-weight: 500;
    font-size: 0.9rem;
}

.cv-button-container {
    display: flex;
    justify-content: center;
    width: 100%;
}





/* Animación para los botones al hacer clic */
@keyframes buttonClick {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

/* Animaciones solo en dispositivos móviles */
@media (max-width: 767px) {
    .contact-button:active, .action-button:active {
        animation: buttonClick 0.3s ease;
    }
}

/* Animaciones hover para desktop */
@media (min-width: 768px) {
    .contact-button:hover, .action-button:hover {
        transform: scale(1.1);
    }
}