/* style.css */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    background-color: #ffffff;
    color: #333;
    box-sizing: border-box;
    /* Eliminar padding-top/bottom aquí si queremos que la tarjeta toque los bordes del body en responsive */
    /* padding-top: 20px; */
    /* padding-bottom: 20px; */
}

.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 20px; /* Este padding es para escritorio y tablet */
    width: 90%;
    max-width: 400px;
    text-align: center;
    overflow: hidden;
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
}

.top-logo {
    position: absolute;
    top: 20px; /* Se mantiene para escritorio */
    left: 50%;
    transform: translateX(-50%);
    max-height: 30px;
    width: auto;
    z-index: 10;
}

.header {
    padding: 20px 0;
    color: #fff;
    background: linear-gradient(to bottom, #5d2566, #451c4b);
    border-radius: 15px 15px 0 0;
    margin: -20px -20px 20px -20px;
    position: relative;
    padding-top: 100px; /* Se mantiene para escritorio */
    padding-bottom: 30px;
    text-align: center;
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    display: block;
    margin: -40px auto 10px; /* Se mantiene para escritorio */
}

.header h1 {
    margin: 10px 0 5px;
    color: #fff;
    font-size: 1.5em;
    word-wrap: break-word;
}

.header p {
    margin: 0;
    font-size: 0.9em;
    color: #e0e0e0;
}

.icons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.icon-button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.icon-button img {
    width: 24px;
    height: 24px;
    filter: invert(100%);
}

.details-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: bold;
    color: #555;
    flex: 1;
    text-align: left;
}

.detail-value {
    color: #333;
    flex: 2;
    text-align: right;
}

.detail-value a {
    color: #007bff;
    text-decoration: none;
    display: block;
}

.detail-value a:hover {
    text-decoration: underline;
}

.add-contact-button {
    background-color: #451c4b;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 25px;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.3s ease;
    width: 100%;
}

.add-contact-button:hover {
    background-color: #5d2566;
}

.add-contact-button img {
    width: 20px;
    height: 20px;
    filter: invert(100%);
}

/* Media Query para pantallas pequeñas (responsive) */
@media (max-width: 600px) {
    /* CAMBIO CLAVE: Añadir padding-top al body en responsive para crear espacio arriba de la tarjeta */
    body {
        padding-top: 20px; /* Ajusta este valor para el espacio deseado */
    }

    .container {
        border-radius: 0;
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .top-logo {
        /* CAMBIO CLAVE: Bajar el logo aún más en responsive */
        top: 30px; /* Antes 15px. Sube este valor para bajar el logo */
        max-height: 25px;
    }

    .header {
        border-radius: 0;
        margin: 0;
        /* Aumentar el padding-top del header en responsive si es necesario */
        padding-top: 100px; /* Antes 90px. Asegura suficiente espacio vertical dentro del encabezado */
        padding-bottom: 20px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .profile-pic {
        /* Bajar la foto más para que no se salga del header y haya espacio entre logo y foto */
        margin-top: -30px; /* Se mantiene igual que en la última versión, si el logo sigue tapando la foto, puedes hacer este valor menos negativo (ej. -20px, -10px, 0px) */
        width: 80px;
        height: 80px;
    }

    .details-card {
        border-radius: 0;
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 10px;
    }

    .header h1 {
        font-size: 1.3em;
        line-height: 1.2;
    }

    .header p {
        font-size: 0.8em;
    }

    .icons {
        margin-top: 10px;
    }
}